We want executors to enforce that there are never multiple active at the same time. This is ensured through `Enter`, which will panic if you attempt to create more than one. However, by requiring you to pass an `&mut Enter` to `executor::with_default`, we were *also* disallowing temporarily overriding the current executor. This patch removes that requirement.
tokio-reactor
Event loop that drives Tokio I/O resources.
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:
-
Reactoris the main type of this crate. It performs the event loop logic. -
Handleprovides a reference to a reactor instance. -
RegistrationandPollEventedallow 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.