Crate tokio_reactor[][src]

Event loop that drives Tokio I/O resources.

The reactor is the engine that drives asynchronous I/O resources (like TCP and UDP sockets). It is backed by mio and acts as a bridge between mio and futures.

The crate provides:

  • Reactor is the main type of this crate. It performs the event loop logic.

  • Handle provides a reference to a reactor instance.

  • Registration and PollEvented allow third parties to implement I/O resources that are driven by the reactor.

Application authors will not use this crate directly. Instead, they will use the tokio crate. Library authors should only depend on tokio-reactor if they are building a custom I/O resource.

For more details, see reactor module documentation in the Tokio crate.



Handle to the reactor running on a background thread.


A reference to a reactor.


Associates an I/O resource that implements the std::Read and / or std::Write traits with the reactor that drives it.


The core reactor, or event loop.


Associates an I/O resource with the reactor instance that drives it.


Error returned from Handle::set_fallback.


Return value from the turn method on Reactor.



Set the default reactor for the duration of the closure