ChannelBuffer
Establishes unpublished empty state. @param Capacity Positive bound.
Module std.sync
import std.sync;Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.
pub init(Capacity: usize)
pub init(Capacity: usize)Establishes unpublished empty state. Capacity: Positive bound.
pub init(Source: readonly Self&) = delete;
pub init(Source: readonly Self&) = delete;Rejects duplicate FIFO ownership. Source: Existing buffer.
pub init(Source: mut Self&&)
pub init(Source: mut Self&&)Transfers unpublished FIFO storage and close identity. Source: Buffer left empty.
pub Capacity: usize
pub Capacity: usizeObserves fixed positive logical capacity.
pub IsClosed: bool
pub IsClosed: boolObserves close state under the queue guard.
TryReserve
pub fn TryReserve() -> Result<void, AllocationError>Reserves all queue slots before publication; may allocate. Return: Exact allocation failure without queued values.
TryAppend
pub fn TryAppend(mut Value: T) -> Result<void, DequeInsertionError<T>>Commits one item under a reserved slot and queue guard. Value: Owned item; returned unchanged on allocation failure. Return: Ok or exact owning deque error.
RemoveFront
pub fn RemoveFront() -> T?Transfers the oldest buffered value under the queue guard. Return: Owned item or none when drained.
Close
pub fn Close() -> boolIrreversibly closes insertion under the queue guard. Return: True only for the first close.