Expand description
Platform-specific synchronization primitives
This module provides cross-platform abstractions for synchronization primitives that work on both native (tokio) and WASM targets.
On native targets, we use tokio’s async synchronization primitives. On WASM, we use std::sync primitives (which work because WASM is single-threaded) and futures::channel for message passing.
Modules§
- mpsc
- A multi-producer, single-consumer queue for sending values between asynchronous tasks.
Macros§
- mutex_
lock - Helper macro for acquiring a mutex lock.
- read_
lock - Helper macro for acquiring a read lock.
- write_
lock - Helper macro for acquiring a write lock.