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
private T[] bufferprivate size_t headprivate size_t tailprivate size_t countprivate size_t capacity_private size_t initialCapacity_private size_t maxCapacity_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) @trustedvoid close() @trusted