Module async_condition

Module async_condition 

Source
Expand description

Single-threaded, no_std + alloc port of the AsyncCondition primitive from rust-lumanoi-core (originally under the Fuchsia BSD-style license).

Upstream source: /Users/darco/Projects/rust-lumanoi/rust-lumanoi-core/src/async_condition.rs

Differences from the upstream:

  • std::sync::Mutexcore::cell::RefCell (UMSH is single-threaded).
  • AtomicUsize trigger counter → Cell<usize>.

Everything else (Slab<Waker>, ticket-based deregistration, forget_ticket, the counter-snapshot check in poll_wait that prevents lost wakes across trigger-then-wait races) is preserved.

Structs§

AsyncCondition
An asynchronous condition that can block multiple tasks until triggered.
AsyncConditionTicket
AsyncConditionWait
Instance of Future returned by AsyncCondition.wait().