eve.rt.channel.dynamic
Dynamic-resize channel for the EVE runtime.
A dynamic channel grows up to a configurable maximum capacity and shrinks back toward the initial capacity when items are consumed. This balances memory usage against burst tolerance.
struct ChannelDynamic
Types 1
structChannelDynamic(T)
Dynamic-resize channel that grows on demand and shrinks on consume.
The buffer starts at initialCapacity and grows up to maxCapacity. When the buffer drains below a shrink threshold, it compacts back toward initialCapacity.
Fields
T[] buffersize_t headsize_t tailsize_t countsize_t capacity_size_t initialCapacity_size_t maxCapacity_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) @trustedvoid close() @trusted