Skip to main content

moduvex_runtime/sync/
mod.rs

1//! Synchronisation primitives for async tasks.
2//!
3//! All primitives are async-aware: waiting tasks yield back to the executor
4//! instead of blocking the OS thread.
5//!
6//! | Primitive | Module  | Description                                      |
7//! |-----------|---------|--------------------------------------------------|
8//! | `mpsc`    | [`mpsc`] | Multi-producer single-consumer channel (bounded + unbounded) |
9//! | `oneshot` | [`oneshot`] | Send exactly one value; `Receiver` is a `Future` |
10//! | `Mutex`   | [`mutex`] | Async mutex with FIFO waiter queue               |
11
12pub mod mpsc;
13pub mod mutex;
14pub mod oneshot;
15
16pub use mutex::{Mutex, MutexGuard};
17pub use oneshot::RecvError;