Skip to main content

Crate qubit_lock

Crate qubit_lock 

Source
Expand description

§Qubit Lock

Lock utilities for the Qubit Rust libraries.

The crate provides:

  • Synchronous lock wrappers with Arc integrated internally.
  • Optional asynchronous Tokio-based lock wrappers behind the async feature.
  • Monitor-style coordination built on parking_lot and standard-library Mutex plus Condvar pairs.

Public API items are re-exported from the crate root. The internal lock and monitor modules are implementation details and are not public import paths.

use qubit_lock::lock::Lock;
use qubit_lock::monitor::Monitor;

Structs§

ArcAsyncMutex
Asynchronous Mutex Wrapper
ArcAsyncRwLock
Asynchronous Read-Write Lock Wrapper
ArcMonitor
Arc-wrapped monitor for shared condition-based state coordination.
ArcMutex
Synchronous Mutex Wrapper (Parking Lot)
ArcRwLock
Parking-lot read-write lock wrapper.
ArcStdMonitor
Arc-wrapped monitor for shared condition-based state coordination.
ArcStdMutex
Synchronous Standard Mutex Wrapper
ArcStdRwLock
Standard-library read-write lock wrapper.
Monitor
Shared state protected by a mutex and a condition variable.
MonitorGuard
Guard returned by Monitor::lock.
StdMonitor
Shared state protected by a mutex and a condition variable.
StdMonitorGuard
Guard returned by StdMonitor::lock.

Enums§

TryLockError
Non-blocking lock acquisition error.
WaitTimeoutResult
Result of waiting for a predicate with an overall timeout.
WaitTimeoutStatus
Result of a timed wait operation.

Traits§

AsyncLock
Unified asynchronous lock trait
Lock
Unified synchronous lock trait