Ferrous API Reference

All Types / Ferrous.Concurrency

class ChannelReceiver<T>

public sealed class ChannelReceiver<T>

Receive-only handle for a TypedChannel.

Type Parameters
T
The message payload type.

Methods

public bool TryReceive([MaybeNullWhen(false)] out T item)

Attempts to read an item synchronously without blocking.

public ValueTask<T> ReceiveAsync(CancellationToken cancellationToken = default)

Asynchronously reads the next item from the channel.

public IAsyncEnumerable<T> ReceiveAllAsync(CancellationToken cancellationToken = default)

Streams all remaining items until the sender completes the channel.