qubit_lock/lib.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2025 - 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! # Qubit Lock
11//!
12//! Lock utilities for the Qubit Rust libraries.
13//!
14//! The crate provides:
15//!
16//! - Synchronous lock wrappers with `Arc` integrated internally.
17//! - Optional asynchronous Tokio-based lock wrappers behind the `async` feature.
18//! - Monitor-style coordination built on `parking_lot` and standard-library
19//! `Mutex` plus `Condvar` pairs.
20//!
21
22pub mod lock;
23pub mod monitor;
24#[cfg(feature = "async")]
25pub use lock::{
26 ArcAsyncMutex,
27 ArcAsyncRwLock,
28 AsyncLock,
29};
30pub use lock::{
31 ArcMonitor,
32 ArcMutex,
33 ArcRwLock,
34 ArcStdMonitor,
35 ArcStdMutex,
36 Lock,
37 Monitor,
38 MonitorGuard,
39 StdMonitor,
40 StdMonitorGuard,
41 TryLockError,
42 WaitTimeoutResult,
43 WaitTimeoutStatus,
44};