pub fn wake(&self, wake_count: usize) -> usize {
        let mut inner = self.inner.lock();
        inner.set_owner(None);
        for i in 0..wake_count {
            if let Some(waiter) = inner.waiter_queue.pop_front() {
                waiter.wake();
            } else {
                return i;
            }
        }
        wake_count
    }
/// Wake some number of threads waiting on a futex.
///
/// It wakes at most `wake_count` of the waiters that are waiting on this futex.
/// Return the number of waiters that were woken up.
///
/// # Ownership
///
/// The owner of the futex is set to nothing, regardless of the wake count.
Wake some number of threads waiting on a futex.
It wakes at most `wake_count` of the waiters that are waiting on this futex.
Return the number of waiters that were woken up.
Wake some number of threads waiting on a futex . It wakes at most ` wake_count ` of the waiters that are waiting on this futex . Return the number of waiters that were woken up .
pub fn wake(&self, wake_count: usize) -> usize {
        let mut inner = self.inner.lock();
        inner.set_owner(None);
        for i in 0..wake_count {
            if let Some(waiter) = inner.waiter_queue.pop_front() {
                waiter.wake();
            } else {
                return i;
            }
        }
        wake_count
    }
pub fn wake ( & self , wake_count : usize ) -> usize { let mut inner = self . inner . lock ( ) ; inner . set_owner ( None ) ; for i in 0 .. wake_count { if let Some ( waiter ) = inner . waiter_queue . pop_front ( ) { waiter . wake ( ) ; } else { return i ; } } wake_count }
Wake some number of threads waiting on a futex.
Wake some number of threads waiting on a futex .
&self
wake_count
usize
&self
wake_count
usize
ownership
The owner of the futex is set to nothing, regardless of the wake count.
The owner of the futex is set to nothing regardless of the wake count .