diff --git a/Cargo.toml b/Cargo.toml index b3a06a6fd..b4819cdf3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,12 +19,12 @@ appveyor = { repository = "alexcrichton/tokio-core" } [dependencies] bytes = "0.4" log = "0.3" -mio = { git = "https://github.com/carllerche/mio", rev = "d8576d9" } +mio = "0.6.9" scoped-tls = "0.1.0" slab = "0.3" iovec = "0.1" tokio-io = "0.1" -futures = "0.1.11" +futures = "0.1.14" [dev-dependencies] env_logger = { version = "0.3", default-features = false } diff --git a/src/reactor/mod.rs b/src/reactor/mod.rs index 9b6523e83..b3e54907f 100644 --- a/src/reactor/mod.rs +++ b/src/reactor/mod.rs @@ -775,54 +775,7 @@ fn usize2ready(bits: usize) -> mio::Ready { ready | platform::usize2ready(bits) } -#[cfg(all(unix, not(any(target_os = "freebsd", target_os = "dragonfly"))))] -mod platform { - use mio::Ready; - use mio::unix::UnixReady; - - pub fn aio() -> Ready { - // Even though some of these platforms define EVFILT_AIO, they - // don't implement it with their reactors, so there's no point - // to using it. - Ready::empty() - } - - pub fn all() -> Ready { - hup() - } - - pub fn hup() -> Ready { - UnixReady::hup().into() - } - - const HUP: usize = 1 << 2; - const ERROR: usize = 1 << 3; - - pub fn ready2usize(ready: Ready) -> usize { - let ready = UnixReady::from(ready); - let mut bits = 0; - if ready.is_error() { - bits |= ERROR; - } - if ready.is_hup() { - bits |= HUP; - } - bits - } - - pub fn usize2ready(bits: usize) -> Ready { - let mut ready = UnixReady::from(Ready::empty()); - if bits & HUP != 0 { - ready.insert(UnixReady::hup()); - } - if bits & ERROR != 0 { - ready.insert(UnixReady::error()); - } - ready.into() - } -} - -#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))] +#[cfg(unix)] mod platform { use mio::Ready; use mio::unix::UnixReady; @@ -877,10 +830,6 @@ mod platform { mod platform { use mio::Ready; - pub fn aio() -> Ready { - Ready::empty() - } - pub fn all() -> Ready { // No platform-specific Readinesses for Windows Ready::empty()