mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
Revert changes to read_ready and add platform::all()
This commit is contained in:
parent
81beb44565
commit
42f73cb0ec
@ -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()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user