Revert changes to read_ready and add platform::all()

This commit is contained in:
Alan Somers 2017-05-21 11:01:48 -06:00
parent 81beb44565
commit 42f73cb0ec

View File

@ -469,8 +469,7 @@ impl Inner {
mio::Token(TOKEN_START + entry.index() * 2),
mio::Ready::readable() |
mio::Ready::writable() |
platform::hup() |
platform::aio(),
platform::all(),
mio::PollOpt::edge()));
Ok((sched.readiness.clone(), entry.insert(sched).index()))
}
@ -748,7 +747,7 @@ impl<F: FnOnce(&Core) + Send + 'static> FnBox for F {
}
fn read_ready() -> mio::Ready {
mio::Ready::readable() | platform::hup() | platform::aio()
mio::Ready::readable() | platform::hup()
}
const READ: usize = 1 << 0;
@ -788,6 +787,10 @@ mod platform {
Ready::empty()
}
pub fn all() -> Ready {
hup()
}
pub fn hup() -> Ready {
UnixReady::hup().into()
}
@ -828,6 +831,10 @@ mod platform {
UnixReady::aio().into()
}
pub fn all() -> Ready {
hup() | aio()
}
pub fn hup() -> Ready {
UnixReady::hup().into()
}
@ -874,6 +881,11 @@ mod platform {
Ready::empty()
}
pub fn all() -> Ready {
// No platform-specific Readinesses for Windows
Ready::empty()
}
pub fn hup() -> Ready {
Ready::empty()
}