pub fn notify(&self) {
        let tid = self.waiter.swap(ThreadId::zero(), Ordering::Acquire);
        if tid != ThreadId::zero() {
            // We shouldn't do wakeup + yield here.
            // It implies the caller wants to yield, but it might for example be still preparing it's blocked state.
            with_thread(tid, |t| t.wakeup());
        }
    }
/// Notifies the waiter if there is one.
Notifies the waiter if there is one.
Notifies the waiter if there is one .
pub fn notify(&self) {
        let tid = self.waiter.swap(ThreadId::zero(), Ordering::Acquire);
        if tid != ThreadId::zero() {
            // We shouldn't do wakeup + yield here.
            // It implies the caller wants to yield, but it might for example be still preparing it's blocked state.
            with_thread(tid, |t| t.wakeup());
        }
    }
pub fn notify ( & self ) { let tid = self . waiter . swap ( ThreadId :: zero ( ) , Ordering :: Acquire ) ; if tid != ThreadId :: zero ( ) { // We shouldn't do wakeup + yield here. // It implies the caller wants to yield, but it might for example be still preparing it's blocked state. with_thread ( tid , | t | t . wakeup ( ) ) ; } }
Notifies the waiter if there is one.
Notifies the waiter if there is one .
&self
&self