pub(crate) fn try_lock(&self) -> Option<TryLock<'_, T>> {
        if !self.locked.swap(true, SeqCst) {
            Some(TryLock { __ptr: self })
        } else {
            None
        }
    }
Attempts to acquire this lock, returning whether the lock was acquired or
not.

If `Some` is returned then the data this lock protects can be accessed
through the sentinel. This sentinel allows both mutable and immutable
access.

If `None` is returned then the lock is already locked, either elsewhere
on this thread or on another thread.
futures-channel/src/lock.rs