fn check_expirations(&mut self) {
        unsafe {
            let now = self.clock.now();
            loop {
                let first = self.waiters.peek_first();
                if first.is_null() {
                    return;
                }
                let first_expiry = (*first).expiry;
                if now >= first_expiry {
                    // The timer is expired.
                    (*first).state = PollState::Expired;
                    if let Some(task) = (*first).task.take() {
                        task.wake();
                    }
                    self.waiters.remove(first);
                }
                else {
                    // Remaining timers are not expired
                    break;
                }
            }
        }
    }
/// Checks whether any of the attached Futures is expired
Checks whether any of the attached Futures is expired
Checks whether any of the attached Futures is expired
fn check_expirations(&mut self) {
        unsafe {
            let now = self.clock.now();
            loop {
                let first = self.waiters.peek_first();
                if first.is_null() {
                    return;
                }
                let first_expiry = (*first).expiry;
                if now >= first_expiry {
                    // The timer is expired.
                    (*first).state = PollState::Expired;
                    if let Some(task) = (*first).task.take() {
                        task.wake();
                    }
                    self.waiters.remove(first);
                }
                else {
                    // Remaining timers are not expired
                    break;
                }
            }
        }
    }
fn check_expirations ( & mut self ) { unsafe { let now = self . clock . now ( ) ; loop { let first = self . waiters . peek_first ( ) ; if first . is_null ( ) { return ; } let first_expiry = ( * first ) . expiry ; if now >= first_expiry { // The timer is expired. ( * first ) . state = PollState :: Expired ; if let Some ( task ) = ( * first ) . task . take ( ) { task . wake ( ) ; } self . waiters . remove ( first ) ; } else { // Remaining timers are not expired break ; } } } }
Checks whether any of the attached Futures is expired
Checks whether any of the attached Futures is expired
&mut self
&mut self