pub type Mutex = async_std::sync::Arc>; pub type Guard = async_std::sync::MutexGuardArc; pub fn new(t: T) -> async_std::sync::Arc> { async_std::sync::Arc::new(async_std::sync::Mutex::new(t)) } pub fn clone(m: &Mutex) -> Mutex { async_std::sync::Arc::clone(m) } pub fn unwrap(t: Mutex) -> Option { if let Ok(mutex) = async_std::sync::Arc::try_unwrap(t) { Some(async_std::sync::Mutex::into_inner(mutex)) } else { None } }