Extract the reactor to a dedicated crate. (#169)

This allows libraries that require access to reactor related types to
depend on this crate without having to depend on the entirety of Tokio.

For example, libraries that implement their custom I/O resource will
need to access `Registration` or `PollEvented`.
This commit is contained in:
Carl Lerche
2018-03-02 13:51:34 -08:00
committed by GitHub
parent df6e24255b
commit e1b3085153
21 changed files with 1268 additions and 1119 deletions
+2 -3
View File
@@ -104,8 +104,7 @@
//! [idle]: struct.Runtime.html#method.shutdown_on_idle
//! [`tokio::spawn`]: ../executor/fn.spawn.html
use reactor::{self, Reactor, Handle};
use reactor::background::Background;
use reactor::{Reactor, Handle, Background};
use tokio_threadpool::{self as threadpool, ThreadPool, Sender};
use futures::Poll;
@@ -221,7 +220,7 @@ impl Runtime {
let pool = threadpool::Builder::new()
.around_worker(move |w, enter| {
reactor::with_default(&handle, enter, |_| {
::tokio_reactor::with_default(&handle, enter, |_| {
w.run();
});
})