kio
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.
Shared is the role-less sibling for state that both sides mutate, and Queue is a
poll-native FIFO queue (bounded or unbounded) built in the same style. Park holds a
waiter for as long as a poll stays pending, bridging a std::task::Context to kio's
waiter-based polls when implementing Future or poll_* on top of kio channels, and
Fan hands out a waker that wakes a whole waiter list, for driving a foreign future on
behalf of everyone parked on it. It either owns the list or reaches one already inside a
Lock.
It's used internally by moq-net and friends, but is generic enough to be useful on its own.
See the API documentation for details.