Table of Contents

Struct P2PBatchReceiveResult<T>

Namespace
DotCompute.Abstractions.Messaging
Assembly
DotCompute.Abstractions.dll

Result of a P2P batch receive operation.

public readonly struct P2PBatchReceiveResult<T> where T : unmanaged

Type Parameters

T

The message type.

Inherited Members

Properties

Count

Gets the number of messages received.

public int Count { get; }

Property Value

int

ErrorMessage

Gets the error message if the receive failed.

public string? ErrorMessage { get; init; }

Property Value

string

LatencyMicroseconds

Gets the receive latency in microseconds.

public double LatencyMicroseconds { get; init; }

Property Value

double

Messages

Gets the received messages.

public required ReadOnlyMemory<T> Messages { get; init; }

Property Value

ReadOnlyMemory<T>

Methods

Empty()

Creates an empty result.

public static P2PBatchReceiveResult<T> Empty()

Returns

P2PBatchReceiveResult<T>

Failure(string)

Creates a failed result.

public static P2PBatchReceiveResult<T> Failure(string errorMessage)

Parameters

errorMessage string

Returns

P2PBatchReceiveResult<T>

WithMessages(ReadOnlyMemory<T>, double)

Creates a result with messages.

public static P2PBatchReceiveResult<T> WithMessages(ReadOnlyMemory<T> messages, double latencyUs)

Parameters

messages ReadOnlyMemory<T>
latencyUs double

Returns

P2PBatchReceiveResult<T>