Skip to main content

Module channel

Module channel 

Source
Expand description

Closeable bounded MPSC channel.

Channel mirrors FS2’s bounded Channel shape for Datum: many producers feed exactly one active consumer stream. The element path is a crossbeam_queue::ArrayQueue; producers do not send actor messages per element and the successful send / try_send fast path takes no mutex. Waiting producers park through a waker protocol when the ring is full, and the synchronous consumer parks on the same fenced condvar pattern used by BoundedSourceQueue.

This first version intentionally has a close-only terminal model. There is no typed fail() API: close() is graceful, buffered elements drain, and the source then completes.

Structs§

Channel
A closeable bounded MPSC channel whose consumer side is a Source.

Enums§

SendError
Error returned by Channel::send when the channel closes before the value is accepted.
TrySendError
Error returned by Channel::try_send.