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 traits and concrete parking_lot, standard-library, Tokio, and mock monitor implementations.

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
ArcMockMonitor
Cloneable handle around a MockMonitor.
ArcMutex
Synchronous Mutex Wrapper (Parking Lot)
ArcParkingLotMonitor
Arc-wrapped monitor for shared condition-based state coordination.
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.
ArcTokioMonitor
Cloneable handle around a TokioMonitor.
MockMonitor
Monitor implementation for deterministic tests.
ParkingLotMonitor
Shared state protected by a mutex and a condition variable.
ParkingLotMonitorGuard
Guard returned by ParkingLotMonitor::lock.
StdMonitor
Shared state protected by a mutex and a condition variable.
StdMonitorGuard
Guard returned by StdMonitor::lock.
TokioMonitor
Asynchronous monitor built on Tokio synchronization primitives.

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§

AsyncConditionWaiter
Waits asynchronously for predicates over protected monitor state.
AsyncLock
Unified asynchronous lock trait
AsyncMonitor
Aggregate trait for asynchronous monitor-style synchronization.
AsyncNotificationWaiter
Waits asynchronously until a notification is observed.
AsyncTimeoutConditionWaiter
Waits asynchronously for predicates over protected state with timeouts.
AsyncTimeoutNotificationWaiter
Waits asynchronously for a notification with a relative timeout.
ConditionWaiter
Waits for predicates over protected monitor state.
Lock
Unified synchronous lock trait
Monitor
Aggregate trait for blocking monitor-style synchronization.
NotificationWaiter
Waits until a notification is observed.
Notifier
Sends notification signals to waiters.
SharedAsyncMonitor
Aggregate trait for cloneable, shared asynchronous monitor handles.
SharedMonitor
Aggregate trait for cloneable, shared blocking monitor handles.
TimeoutConditionWaiter
Waits for predicates over protected state with relative timeouts.
TimeoutNotificationWaiter
Waits for a notification with a relative timeout.

Type Aliases§

AsyncMonitorFuture
Sendable boxed future returned by asynchronous monitor operations.