eve.rt.channel
Cross-thread and cross-fiber communication channels.
This module provides typed channels for safe message passing between concurrent execution contexts. Channels support both bounded (with a maximum capacity) and unbounded operation modes.
Types 2
enumChannelStatus : ubyte
Channel status codes returned by non-blocking operations.
SUCCESS = 0Operation completed successfully.
WOULD_BLOCK = 1Channel is empty (for receive) or full (for send).
CLOSED = 2Channel has been closed.
structChannel(T)
A typed channel for cross-thread/cross-fiber communication.
Channels provide a safe way to pass messages between concurrent execution contexts. They can be bounded (with a maximum capacity) or unbounded.
Example:
auto ch = Channel!int(10); // bounded channel with capacity 10
ch.send(42);
auto value = ch.receive();
assert(value == 42);Fields
T[] buffersize_t headsize_t tailsize_t countsize_t capacity_bool closed_Mutex mutexCondition notEmptyCondition notFullMethods