tokio/tokio-reactor
Carl Lerche a850063211
Handle::default() should lazily bind to reactor. (#350)
Currently, not specifying a `Handle` is different than using
`Handle::default()`. This is because `Handle::default()` will
immediately bind to the reactor for the current context vs. not
specifying a `Handle`, which binds to a reactor when it is polled.

This patch changes the `Handle::default()` behavior, bringing it inline
with actual defaults.

`Handle::current()` still immediately binds to the current reactor.

Fixes #307
2018-05-11 08:32:03 -07:00
..
2018-03-23 10:34:42 -07:00

tokio-reactor

Event loop that drives Tokio I/O resources.

Documentation

Overview

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.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tokio by you, shall be licensed as MIT, without any additional terms or conditions.