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
T[] buffersize_t headsize_t tailsize_t countsize_t capacity_size_t memoryLimit_bool closed_Mutex mutexCondition notEmptyCondition 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