Skip to main content

Crate conducer

Crate conducer 

Source
Expand description

Producer/consumer shared state with async waker-based notification.

This crate provides Producer and Consumer types that share state through a mutex-protected value. Producers can modify the state and consumers are automatically notified via async wakers. The channel auto-closes when all producers are dropped.

Structs§

Consumer
The consuming side of a shared state channel.
Mut
A mutable guard over the shared state.
Producer
The producing side of a shared state channel.
Ref
A read-only guard over the shared state.
Waiter
Handle passed to poll functions for registering with WaiterLists
WaiterList
A list of weak wakers waiting for notification
Weak
A weak reference to a Producer/Consumer state.

Functions§

wait
Create a Future from a poll function that receives a Waiter.