mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
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:
+2
-3
@@ -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();
|
||||
});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user