async fn lock_weak<T>(weak: &Weak<Mutex<T>>) -> Option<OwnedMutexGuard<T>> {
    if let Some(arc) = weak.upgrade() {
        Some(arc.lock_owned().await)
    } else {
        None
    }
}
/// Attempt to lock a mutex behind a weak pointer, returning `None` if its corresponding `Arc` no
/// longer exists.
Attempt to lock a mutex behind a weak pointer, returning `None` if its corresponding `Arc` no
longer exists.
Attempt to lock a mutex behind a weak pointer returning ` None ` if its corresponding ` Arc ` no longer exists .
async fn lock_weak<T>(weak: &Weak<Mutex<T>>) -> Option<OwnedMutexGuard<T>> {
    if let Some(arc) = weak.upgrade() {
        Some(arc.lock_owned().await)
    } else {
        None
    }
}
async fn lock_weak < T > ( weak : & Weak < Mutex < T > > ) -> Option < OwnedMutexGuard < T > > { if let Some ( arc ) = weak . upgrade ( ) { Some ( arc . lock_owned ( ) . await ) } else { None } }
Attempt to lock a mutex behind a weak pointer, returning `None` if its corresponding `Arc` no
longer exists.
Attempt to lock a mutex behind a weak pointer returning ` None ` if its corresponding ` Arc ` no longer exists .
weak
&Weak<Mutex<T>>