fn stop_polling(&self, to_poll: u8, will_be_woken: bool) -> u8 {
        self.state
            .fetch_update(Ordering::SeqCst, Ordering::SeqCst, |mut value| {
                let mut next_value = to_poll;

                value &= NEED_TO_POLL_ALL;
                if value != NONE || will_be_woken {
                    next_value |= WOKEN;
                }
                next_value |= value;

                Some(next_value & !POLLING & !WAKING)
            })
            .unwrap()
    }
Sets current state to
- `!POLLING` allowing to use wakers
- `WOKEN` if the state was changed during `POLLING` phase as waker will be called,
or `will_be_woken` flag supplied
- `!WAKING` as
* Wakers called during the `POLLING` phase won't propagate their calls
* `POLLING` phase can't start if some of the wakers are active
So no wrapped waker can touch the inner waker's cell, it's safe to poll again.
futures-util/src/stream/stream/flatten_unordered.rs