pub fn remove(&self, pid: process::Id) -> bool {
        let mut q = self.q.lock();

        // There's a significant chance that the process requesting itself to be
        // removed is the process previously awakened by awaken_one, and
        // therefore at the back of the queue, so we should iterate in reverse
        let found = q.iter().enumerate().rev().find(|&(_, &x)| x == pid);

        if let Some((index, _)) = found {
            q.remove(index);
            true
        } else {
            false
        }
    }
/// Remove a process from the wait queue.
Remove a process from the wait queue.
Remove a process from the wait queue .
pub fn remove(&self, pid: process::Id) -> bool {
        let mut q = self.q.lock();
        // There's a significant chance that the process requesting itself to be
        // removed is the process previously awakened by awaken_one, and
        // therefore at the back of the queue, so we should iterate in reverse
        let found = q.iter().enumerate().rev().find(|&(_, &x)| x == pid);
        if let Some((index, _)) = found {
            q.remove(index);
            true
        } else {
            false
        }
    }
pub fn remove ( & self , pid : process :: Id ) -> bool { let mut q = self . q . lock ( ) ; // There's a significant chance that the process requesting itself to be // removed is the process previously awakened by awaken_one, and // therefore at the back of the queue, so we should iterate in reverse let found = q . iter ( ) . enumerate ( ) . rev ( ) . find ( | & ( _ , & x ) | x == pid ) ; if let Some ( ( index , _ ) ) = found { q . remove ( index ) ; true } else { false } }
Remove a process from the wait queue.
Remove a process from the wait queue .
&self
pid
process::Id