oa::Channel
oa::Channel <T > — bounded MPMC channel (multiple-producer, multiple-consumer). Bounded ring buffer with blocking send/recv and non-blocking trySend/tryRecv. Supports graceful shutdown via close() which unblocks all waiters. usage: oa::Channel <oa ::Matrix> ch(16); // capacity 16 ch.send(tensor); // blocks if full auto t = ch.recv(); // blocks if empty, returns nullopt if closed ch.close(); // unblocks all waiters
Public Methods
Public Method Documentation
No public source comment is attached to this declaration.
Parameters
inCapacityoa::I32—
Returns
voidThe declared return value.
No public source comment is attached to this declaration.
Returns
voidThe declared return value.
No public source comment is attached to this declaration.
Returns
boolThe declared return value.
No public source comment is attached to this declaration.
Returns
oa::Optional<T>The declared return value.
No public source comment is attached to this declaration.
Parameters
inValueT—
Returns
boolThe declared return value.
No public source comment is attached to this declaration.
Returns
oa::I32The declared return value.
No public source comment is attached to this declaration.
Returns
oa::Optional<T>The declared return value.
No public source comment is attached to this declaration.
Parameters
inValueT—
Returns
boolThe declared return value.