eve.rt.channel.unbounded
Unbounded channel for the EVE runtime.
An unbounded channel grows without limit (bounded only by a configurable memory limit). It never blocks on send -- backpressure is applied by checking the memory budget before each send. Receivers block when empty.
Use this when the producer is faster than the consumer but you want to absorb bursts without dropping messages. For fixed-capacity channels, use Channel.
struct ChannelUnbounded
Types 1
structChannelUnbounded(T)
Unbounded channel that grows on demand.
Sends never block -- the internal buffer grows as needed. A configurable memory limit provides backpressure: when the buffer exceeds the limit, trySend returns ChannelStatus.WOULD_BLOCK and blockingSend blocks until capacity is available.
Receivers block when the channel is empty, same as Channel.
Fields
private T[] bufferprivate size_t headprivate size_t tailprivate size_t countprivate size_t capacity_private size_t memoryLimit_private bool closed_private Mutex mutexprivate Condition notEmptyprivate Condition notFullMethods
ChannelStatus trySend(T value, CancelToken token) @trustedChannelStatus tryReceive(out T value, CancelToken token) @trustedChannelStatus blockingSend(T value, CancelToken token) @trustedChannelStatus blockingReceive(out T value, CancelToken token) @trusted