Qubit Lock
Lock-focused utilities for the Qubit Rust libraries. The crate provides synchronous and asynchronous lock wrappers, monitor-style coordination, and a reusable double-checked locking executor.
Features
ArcMutex,ArcRwLock,ArcStdMutex: synchronous lock wrappers withArcbuilt in.ArcAsyncMutex,ArcAsyncRwLock: Tokio-based asynchronous lock wrappers.Monitor,ArcMonitor,MonitorGuard: condition-based state coordination.DoubleCheckedLockExecutor: reusable test-outside-lock / re-test-inside-lock workflow.- Closure-based APIs that keep lock acquisition and release scoped to one call.
Installation
[]
= "0.1.0"
Quick Start
Synchronous lock
use ArcMutex;
Monitor
use ArcMonitor;
Double-checked locking
use ;
use ;
Project Layout
src/lock: lock traits, wrappers, and monitor primitives.src/double_checked: reusable double-checked locking executor and builders.tests/lock: lock and monitor behavior tests.tests/double_checked: double-checked locking behavior tests.tests/docs: README and doctext consistency tests.
Quality Checks
License
Apache-2.0