moduvex-runtime 1.0.0

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

pub mod mpsc;
pub mod mutex;
pub mod oneshot;

pub use mutex::{Mutex, MutexGuard};
pub use oneshot::RecvError;