diff --git a/gst-plugin-threadshare/Cargo.toml b/gst-plugin-threadshare/Cargo.toml index dabec693..b55d98b0 100644 --- a/gst-plugin-threadshare/Cargo.toml +++ b/gst-plugin-threadshare/Cargo.toml @@ -16,6 +16,7 @@ tokio-reactor = { git = "https://github.com/tokio-rs/tokio" } tokio-executor = { git = "https://github.com/tokio-rs/tokio" } tokio-timer = { git = "https://github.com/tokio-rs/tokio" } tokio-threadpool = { git = "https://github.com/tokio-rs/tokio" } +tokio-current-thread = { git = "https://github.com/tokio-rs/tokio" } futures = "0.1" lazy_static = "1.0" either = "1.0" diff --git a/gst-plugin-threadshare/src/iocontext.rs b/gst-plugin-threadshare/src/iocontext.rs index 53b4ea4f..44afb891 100644 --- a/gst-plugin-threadshare/src/iocontext.rs +++ b/gst-plugin-threadshare/src/iocontext.rs @@ -26,7 +26,7 @@ use futures::future; use futures::stream::futures_unordered::FuturesUnordered; use futures::sync::oneshot; use futures::{Future, Stream}; -use tokio::executor::thread_pool; +use tokio_threadpool; use tokio::reactor; use tokio_timer::timer; @@ -124,13 +124,13 @@ impl IOContextRunner { gst_debug!(CONTEXT_CAT, "Started reactor thread '{}'", self.name); if let Some(ref pending_futures) = self.pending_futures { - use tokio::executor::current_thread; + use tokio_current_thread; let handle = reactor.handle(); let mut enter = ::tokio_executor::enter().unwrap(); let timer = timer::Timer::new(reactor); let timer_handle = timer.handle(); - let mut current_thread = current_thread::CurrentThread::new_with_park(timer); + let mut current_thread = tokio_current_thread::CurrentThread::new_with_park(timer); ::tokio_reactor::with_default(&handle, &mut enter, |mut enter| { ::tokio_timer::with_default(&timer_handle, &mut enter, |enter| loop { @@ -245,7 +245,7 @@ pub struct IOContext(Arc); struct IOContextInner { name: String, - pool: Either, + pool: Either, handle: reactor::Handle, // Only used for dropping _shutdown: IOContextShutdown, @@ -284,7 +284,7 @@ impl IOContext { let shutdown = IOContextRunner::start(name, wait, reactor); // FIXME: The executor threads are not throttled at all, only the reactor - let mut pool_builder = thread_pool::Builder::new(); + let mut pool_builder = tokio_threadpool::Builder::new(); pool_builder .around_worker(move |w, enter| { let timer_handle = t1.lock().unwrap().get(w.id()).unwrap().clone(); diff --git a/gst-plugin-threadshare/src/lib.rs b/gst-plugin-threadshare/src/lib.rs index 064a303d..13cf427c 100644 --- a/gst-plugin-threadshare/src/lib.rs +++ b/gst-plugin-threadshare/src/lib.rs @@ -32,6 +32,7 @@ extern crate tokio; extern crate tokio_executor; extern crate tokio_reactor; extern crate tokio_threadpool; +extern crate tokio_current_thread; extern crate tokio_timer; extern crate either;