Expand description
Platform-agnostic sync primitives for FrankenSQLite.
On native targets, these re-export parking_lot types for performance.
On wasm32, they provide wrappers around std::sync primitives, which
work correctly in the single-threaded wasm environment without requiring
unsafe Send/Sync impls.
Downstream crates should import from here instead of parking_lot
directly to enable WASM compilation without #[cfg] at every call site.
Structs§
- Condvar
- A Condition Variable
- Duration
- A
Durationtype to represent a span of time, typically used for system timeouts. - Instant
- A measurement of a monotonically nondecreasing clock.
Opaque and useful only with
Duration. - Once
- A synchronization primitive which can be used to run a one-time initialization. Useful for one-time initialization for globals, FFI or related functionality.
Functions§
Type Aliases§
- Mutex
- A mutual exclusion primitive useful for protecting shared data
- Mutex
Guard - An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
- RwLock
- A reader-writer lock
- RwLock
Read Guard - RAII structure used to release the shared read access of a lock when dropped.
- RwLock
Write Guard - RAII structure used to release the exclusive write access of a lock when dropped.