summaryrefslogtreecommitdiffstats
path: root/src/runtime/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/mod.rs')
-rw-r--r--src/runtime/mod.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/runtime/mod.rs b/src/runtime/mod.rs
index 38feb53f..2e5b344d 100644
--- a/src/runtime/mod.rs
+++ b/src/runtime/mod.rs
@@ -129,8 +129,6 @@ use tokio_threadpool as threadpool;
use futures;
use futures::future::Future;
-#[cfg(feature = "unstable-futures")]
-use futures2;
/// Handle to the Tokio runtime.
///
@@ -215,18 +213,6 @@ where F: Future<Item = (), Error = ()> + Send + 'static,
runtime.shutdown_on_idle().wait().unwrap();
}
-/// Start the Tokio runtime using the supplied future to bootstrap execution.
-///
-/// Identical to `run` but works with futures 0.2-style futures.
-#[cfg(feature = "unstable-futures")]
-pub fn run2<F>(future: F)
- where F: futures2::Future<Item = (), Error = futures2::Never> + Send + 'static,
-{
- let mut runtime = Runtime::new().unwrap();
- runtime.spawn2(future);
- runtime.shutdown_on_idle().wait().unwrap();
-}
-
impl Runtime {
/// Create a new runtime instance with default configuration values.
///
@@ -353,19 +339,6 @@ impl Runtime {
self
}
- /// Spawn a futures 0.2-style future onto the Tokio runtime.
- ///
- /// Otherwise identical to `spawn`
- #[cfg(feature = "unstable-futures")]
- pub fn spawn2<F>(&mut self, future: F) -> &mut Self
- where F: futures2::Future<Item = (), Error = futures2::Never> + Send + 'static,
- {
- futures2::executor::Executor::spawn(
- self.inner_mut().pool.sender_mut(), Box::new(future)
- ).unwrap();
- self
- }
-
/// Run a future to completion on the Tokio runtime.
///
/// This runs the given future on the runtime, blocking until it is