/// Drain all data in the global receiver, ensuring we'll get woken up when
/// there is a write on the other end.
///
/// We do *NOT* use the existence of any read bytes as evidence a sigal was
/// received since the `pending` flags would have already been set if that
/// was the case. See #38 for more info.
Drain all data in the global receiver, ensuring we'll get woken up when
there is a write on the other end.

We do *NOT* use the existence of any read bytes as evidence a sigal was
received since the `pending` flags would have already been set if that
was the case. See #38 for more info.
Drain all data in the global receiver ensuring we ' ll get woken up when there is a write on the other end . We do * NOT * use the existence of any read bytes as evidence a sigal was received since the ` pending ` flags would have already been set if that was the case . See #38 for more info .
fn drain(&mut self) {
        loop {
            match self.wakeup.read(&mut [0; 128]) {
                Ok(0) => panic!("EOF on self-pipe"),
                Ok(_) => {}
                Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => break,
                Err(e) => panic!("Bad read on self-pipe: {}", e),
            }
        }
    }
fn drain ( & mut self ) { loop { match self . wakeup . read ( & mut [ 0 ; 128 ] ) { Ok ( 0 ) => panic ! ( " " ) , Ok ( _ ) => { } Err ( ref e ) if e . kind ( ) == io :: ErrorKind :: WouldBlock => break , Err ( e ) => panic ! ( " " e ) , } } }
Drain all data in the global receiver, ensuring we'll get woken up when
there is a write on the other end.
Drain all data in the global receiver ensuring we ' ll get woken up when there is a write on the other end .
&mut self