Skip to main content

Module shared

Module shared 

Source
Expand description

Shared queue with split writer/reader handles.

Provides concurrent access to a Queue with multiple writers and a single reader. The reader can await new items using Reader::recv, which integrates with select! for multiplexing with other futures.

Writers can be cloned to allow multiple tasks to enqueue items concurrently.

Structs§

Reader
Reader handle for dequeuing and acknowledging items.
Writer
Writer handle for enqueueing items.

Functions§

init
Initialize a shared queue and split into writer and reader handles.