Fix building with the event-stream feature (#566)
This commit is contained in:
parent
176d8beb06
commit
b31782249e
@ -151,8 +151,7 @@ impl EventSource for UnixInternalEventSource {
|
|||||||
return Err(std::io::Error::new(
|
return Err(std::io::Error::new(
|
||||||
std::io::ErrorKind::Interrupted,
|
std::io::ErrorKind::Interrupted,
|
||||||
"Poll operation was woken up by `Waker::wake`",
|
"Poll operation was woken up by `Waker::wake`",
|
||||||
)
|
));
|
||||||
.into());
|
|
||||||
}
|
}
|
||||||
_ => unreachable!("Synchronize Evented handle registration & token handling"),
|
_ => unreachable!("Synchronize Evented handle registration & token handling"),
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ use std::sync::{Arc, Mutex};
|
|||||||
|
|
||||||
use mio::{Registry, Token};
|
use mio::{Registry, Token};
|
||||||
|
|
||||||
use crate::{ErrorKind, Result};
|
use crate::Result;
|
||||||
|
|
||||||
/// Allows to wake up the `mio::Poll::poll()` method.
|
/// Allows to wake up the `mio::Poll::poll()` method.
|
||||||
/// This type wraps `mio::Waker`, for more information see its documentation.
|
/// This type wraps `mio::Waker`, for more information see its documentation.
|
||||||
@ -23,11 +23,7 @@ impl Waker {
|
|||||||
///
|
///
|
||||||
/// Readiness is set to `Ready::readable()`.
|
/// Readiness is set to `Ready::readable()`.
|
||||||
pub(crate) fn wake(&self) -> Result<()> {
|
pub(crate) fn wake(&self) -> Result<()> {
|
||||||
self.inner
|
self.inner.lock().unwrap().wake()
|
||||||
.lock()
|
|
||||||
.unwrap()
|
|
||||||
.wake()
|
|
||||||
.map_err(ErrorKind::IoError)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resets the state so the same waker can be reused.
|
/// Resets the state so the same waker can be reused.
|
||||||
|
Loading…
Reference in New Issue
Block a user