pub async fn next(&mut self) -> std::io::Result<IfEvent> {
        poll_fn(|cx| {
            self.waker.register(cx.waker());
            if self.resync.swap(false, Ordering::Relaxed) {
                if let Err(error) = self.resync() {
                    return Poll::Ready(Err(error));
                }
            }
            if let Some(event) = self.queue.pop_front() {
                Poll::Ready(Ok(event))
            } else {
                Poll::Pending
            }
        })
        .await
    }
/// Returns a future for the next event.
Returns a future for the next event.
Returns a future for the next event .
pub async fn next(&mut self) -> std::io::Result<IfEvent> {
        poll_fn(|cx| {
            self.waker.register(cx.waker());
            if self.resync.swap(false, Ordering::Relaxed) {
                if let Err(error) = self.resync() {
                    return Poll::Ready(Err(error));
                }
            }
            if let Some(event) = self.queue.pop_front() {
                Poll::Ready(Ok(event))
            } else {
                Poll::Pending
            }
        })
        .await
    }
pub async fn next ( & mut self ) -> std :: io :: Result < IfEvent > { poll_fn ( | cx | { self . waker . register ( cx . waker ( ) ) ; if self . resync . swap ( false , Ordering :: Relaxed ) { if let Err ( error ) = self . resync ( ) { return Poll :: Ready ( Err ( error ) ) ; } } if let Some ( event ) = self . queue . pop_front ( ) { Poll :: Ready ( Ok ( event ) ) } else { Poll :: Pending } } ) . await }
Returns a future for the next event.
Returns a future for the next event .
&mut self
&mut self