steel_utils/locks.rs
1#![expect(
2 clippy::disallowed_types,
3 reason = "this module is the canonical definition of the allowed lock types"
4)]
5//! Lock wrappers for debug checks and deadlock prevention.
6
7use tokio::sync::{Mutex, RwLock};
8
9/// A synchronous mutex.
10pub type SyncMutex<T> = parking_lot::Mutex<T>;
11/// A synchronous read-write lock.
12pub type SyncRwLock<T> = parking_lot::RwLock<T>;
13
14/// An asynchronous mutex.
15pub type AsyncMutex<T> = Mutex<T>;
16/// An asynchronous read-write lock.
17pub type AsyncRwLock<T> = RwLock<T>;