eve.rt.channel.broadcast
Broadcast channel for the EVE runtime.
A broadcast channel delivers every sent message to all registered receivers. Each receiver gets its own independent copy of the message stream. Receivers that are slow do not affect other receivers.
Types 2
structBroadcastReceiver(T)
A single receiver's subscription to a broadcast channel.
Each receiver has its own internal buffer of unconsumed messages. Messages are dropped when the buffer overflows (oldest dropped first).
Constructors
this(size_t capacity)structChannelBroadcast(T)
Broadcast channel that delivers every message to all receivers.
Each call to subscribe creates a new receiver with its own buffer. When a value is sent via send, it is pushed into every active receiver's buffer. Slow receivers that overflow their buffer lose the oldest messages (drop-first policy).
Methods
BroadcastReceiver!T * subscribe(size_t capacity = 64) @trustedSubscribe a new receiver with the given per-receiver buffer capacity.