Table of Contents

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

T

The message type.

Inherited Members

Properties

ErrorMessage

Gets the error message if the receive failed.

public string? ErrorMessage { get; init; }

Property Value

string

HasMessage

Gets a value indicating whether a message was received.

public bool HasMessage { get; init; }

Property Value

bool

LatencyMicroseconds

Gets the receive latency in microseconds.

public double LatencyMicroseconds { get; init; }

Property Value

double

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

P2PReceiveResult<T>

Failure(string)

Creates a failed result.

public static P2PReceiveResult<T> Failure(string errorMessage)

Parameters

errorMessage string

Returns

P2PReceiveResult<T>

WithMessage(T, double)

Creates a result with a message.

public static P2PReceiveResult<T> WithMessage(T message, double latencyUs)

Parameters

message T
latencyUs double

Returns

P2PReceiveResult<T>