fn start_polling(
        &self,
    ) -> Option<(u8, PollStateBomb<'_, impl FnOnce(&SharedPollState) -> u8>)> {
        let value = self
            .state
            .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |value| {
                if value & WAKING == NONE && value & NEED_TO_POLL_ALL != NONE {
                    Some(POLLING)
                } else {
                    None
                }
            })
            .ok()?;
        let bomb = PollStateBomb::new(self, SharedPollState::reset);

        Some((value, bomb))
    }
/// Attempts to start polling, returning stored state in case of success.
/// Returns `None` if either waker is waking at the moment or state is empty.
Attempts to start polling, returning stored state in case of success.
Returns `None` if either waker is waking at the moment or state is empty.
Attempts to start polling returning stored state in case of success . Returns ` None ` if either waker is waking at the moment or state is empty .
fn start_polling(
        &self,
    ) -> Option<(u8, PollStateBomb<'_, impl FnOnce(&SharedPollState) -> u8>)> {
        let value = self
            .state
            .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |value| {
                if value & WAKING == NONE && value & NEED_TO_POLL_ALL != NONE {
                    Some(POLLING)
                } else {
                    None
                }
            })
            .ok()?;
        let bomb = PollStateBomb::new(self, SharedPollState::reset);
        Some((value, bomb))
    }
fn start_polling ( & self , ) -> Option < ( u8 , PollStateBomb < ' _ , impl FnOnce ( & SharedPollState ) -> u8 > ) > { let value = self . state . fetch_update ( Ordering :: SeqCst , Ordering :: SeqCst , | value | { if value & WAKING == NONE && value & NEED_TO_POLL_ALL != NONE { Some ( POLLING ) } else { None } } ) . ok ( ) ? ; let bomb = PollStateBomb :: new ( self , SharedPollState :: reset ) ; Some ( ( value , bomb ) ) }
Attempts to start polling, returning stored state in case of success.
Attempts to start polling returning stored state in case of success .
&self
&self