fn atomic_lock(&self) {
        while self
            .locking
            .compare_and_swap(false, true, Ordering::Relaxed)
        {}
    }
// this is needed to avoid sequences like that:
// * thread 1 gains lock
// * thread 2 try lock
// * thread 1 unlock
// * thread 2 register waker
// this creates a situation similar to a deadlock, where the future isn't waked up by nobody
this is needed to avoid sequences like that:
thread 1 gains lock
thread 2 try lock
thread 1 unlock
thread 2 register waker
this creates a situation similar to a deadlock, where the future isn't waked up by nobody
this is needed to avoid sequences like that : thread 1 gains lock thread 2 try lock thread 1 unlock thread 2 register waker this creates a situation similar to a deadlock where the future isn ' t waked up by nobody
fn atomic_lock(&self) {
        while self
            .locking
            .compare_and_swap(false, true, Ordering::Relaxed)
        {}
    }
fn atomic_lock ( & self ) { while self . locking . compare_and_swap ( false , true , Ordering :: Relaxed ) { } }
this is needed to avoid sequences like that:
 thread 1 gains lock
 thread 2 try lock
 thread 1 unlock
 thread 2 register waker
this creates a situation similar to a deadlock, where the future isn't waked up by nobody
this is needed to avoid sequences like that : thread 1 gains lock thread 2 try lock thread 1 unlock thread 2 register waker this creates a situation similar to a deadlock where the future isn ' t waked up by nobody
&self