blob: e49df9c6109de9994f539eb1c758dfd39ebb656e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
pub type Mutex<T> = std::sync::Arc<tokio::sync::Mutex<T>>;
pub type Guard<T> = tokio::sync::OwnedMutexGuard<T>;
pub fn new<T>(t: T) -> Mutex<T> {
std::sync::Arc::new(tokio::sync::Mutex::new(t))
}
pub fn clone<T>(m: &Mutex<T>) -> Mutex<T> {
std::sync::Arc::clone(m)
}
|