Qubit Lock
Lock-focused utilities for the Qubit Rust libraries. The crate provides synchronous and asynchronous lock wrappers plus monitor-style coordination.
Features
ArcMutex,ArcRwLock,ArcStdMutex: synchronous lock wrappers withArcbuilt in.ArcAsyncMutex,ArcAsyncRwLock: Tokio-based asynchronous lock wrappers.Monitor,ArcMonitor,MonitorGuard: condition-based state coordination.- Closure-based APIs that keep lock acquisition and release scoped to one call.
Installation
[]
= "0.3.2"
The async wrappers use Tokio synchronization primitives. If your application
creates a Tokio runtime, enable the appropriate Tokio runtime features in your
own Cargo.toml, such as rt or rt-multi-thread.
Quick Start
Synchronous lock
use ;
Monitor
use ArcMonitor;
Project Layout
src/lock: lock traits and lock wrappers.src/monitor:Monitor/ArcMonitorand related condition-variable primitives.tests/lock: lock behavior tests.tests/monitor: monitor behavior tests.tests/docs: README and doctext consistency tests.
Quality Checks
License
Apache-2.0