diff --git a/src/reactor/mod.rs b/src/reactor/mod.rs index 3f7603ee5..bd9eecd73 100644 --- a/src/reactor/mod.rs +++ b/src/reactor/mod.rs @@ -81,7 +81,7 @@ //! ## Implementation //! //! The reactor implementation uses [`mio`] to interface with the operating -//! system's event queue. A call to [`Reactor::poll`] results in in a single +//! system's event queue. A call to [`Reactor::poll`] results in a single //! call to [`Poll::poll`] which in turn results in a single call to the //! operating system's selector. //! @@ -107,8 +107,8 @@ //! There are a couple of ways to do this. //! //! If the custom I/O resource implements [`mio::Evented`] and implements -//! [`std::Read`] and / or [`std::Write`], then [`PollEvented`] is the most -//! suited. +//! [`std::io::Read`] and / or [`std::io::Write`], then [`PollEvented`] is the +//! most suited. //! //! Otherwise, [`Registration`] can be used directly. This provides the lowest //! level primitive needed for integrating with the reactor: a stream of diff --git a/tokio-reactor/src/lib.rs b/tokio-reactor/src/lib.rs index 0c7a83f2b..713deff54 100644 --- a/tokio-reactor/src/lib.rs +++ b/tokio-reactor/src/lib.rs @@ -49,7 +49,7 @@ mod registration; // ===== Public re-exports ===== -pub use self::background::Background; +pub use self::background::{Background, Shutdown}; pub use self::registration::Registration; pub use self::poll_evented::PollEvented; @@ -61,7 +61,7 @@ use tokio_executor::Enter; use tokio_executor::park::{Park, Unpark}; use std::{fmt, usize}; -use std::io::{self, ErrorKind}; +use std::io; use std::mem; use std::cell::RefCell; use std::sync::atomic::Ordering::{Relaxed, SeqCst}; @@ -353,7 +353,6 @@ impl Reactor { // happened. match self.inner.io.poll(&mut self.events, max_wait) { Ok(_) => {} - Err(ref e) if e.kind() == ErrorKind::Interrupted => return Ok(()), Err(e) => return Err(e), } diff --git a/tokio-reactor/src/poll_evented.rs b/tokio-reactor/src/poll_evented.rs index 350d4c927..99dd8aa46 100644 --- a/tokio-reactor/src/poll_evented.rs +++ b/tokio-reactor/src/poll_evented.rs @@ -52,7 +52,7 @@ use std::sync::atomic::Ordering::Relaxed; /// /// This allows the caller to implement additional functions. For example, /// [`TcpListener`] implements poll_accept by using [`poll_read_ready`] and -/// [`clear_write_ready`]. +/// [`clear_read_ready`]. /// /// ```rust,ignore /// pub fn poll_accept(&mut self) -> Poll<(net::TcpStream, SocketAddr), io::Error> { @@ -85,7 +85,7 @@ use std::sync::atomic::Ordering::Relaxed; /// [`Registration`]: struct.Registration.html /// [`TcpListener`]: ../net/struct.TcpListener.html /// [`clear_read_ready`]: #method.clear_read_ready -/// [`clear_write_ready`]: #method.clear_write_ready +/// [`clear_read_ready`]: #method.clear_read_ready /// [`poll_read_ready`]: #method.poll_read_ready /// [`poll_write_ready`]: #method.poll_write_ready pub struct PollEvented { @@ -342,7 +342,7 @@ where E: Evented /// cannot be cleared as it is a final state. /// /// After calling this function, `poll_write_ready(Ready::writable())` will - /// return `NotReady` until a new read readiness event has been received. + /// return `NotReady` until a new write readiness event has been received. /// /// # Panics ///