Struct P2PReceiveResult<T>
- Namespace
- DotCompute.Abstractions.Messaging
- Assembly
- DotCompute.Abstractions.dll
Result of a P2P receive operation.
public readonly struct P2PReceiveResult<T> where T : unmanaged
Type Parameters
TThe message type.
- Inherited Members
Properties
ErrorMessage
Gets the error message if the receive failed.
public string? ErrorMessage { get; init; }
Property Value
HasMessage
Gets a value indicating whether a message was received.
public bool HasMessage { get; init; }
Property Value
LatencyMicroseconds
Gets the receive latency in microseconds.
public double LatencyMicroseconds { get; init; }
Property Value
Message
Gets the received message.
public T Message { get; init; }
Property Value
- T
Methods
Empty()
Creates an empty result (queue was empty).
public static P2PReceiveResult<T> Empty()
Returns
Failure(string)
Creates a failed result.
public static P2PReceiveResult<T> Failure(string errorMessage)
Parameters
errorMessagestring
Returns
WithMessage(T, double)
Creates a result with a message.
public static P2PReceiveResult<T> WithMessage(T message, double latencyUs)
Parameters
messageTlatencyUsdouble