From 6e45e0ac61b68208310748a61f68dc6df576dbb6 Mon Sep 17 00:00:00 2001 From: Michal 'vorner' Vaner Date: Sat, 25 Aug 2018 21:51:49 +0200 Subject: [PATCH] re-export tokio-current-thread::spawn (#579) Re-export it inside the tokio::runtime::current_thread, as the original place (tokio::executor::current_thread) is hidden from documentation and users need some way to spawn non-Send futures. --- src/executor/mod.rs | 5 ++++- src/runtime/current_thread/mod.rs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/executor/mod.rs b/src/executor/mod.rs index 3f238f8fa..6852e3996 100644 --- a/src/executor/mod.rs +++ b/src/executor/mod.rs @@ -39,7 +39,10 @@ //! [`Executor`]: trait.Executor.html //! [`spawn`]: fn.spawn.html -#[deprecated(since = "0.1.8", note = "use tokio-current-thread crate instead")] +#[deprecated( + since = "0.1.8", + note = "use tokio-current-thread crate or functions in tokio::runtime::current_thread instead", +)] #[doc(hidden)] pub mod current_thread; diff --git a/src/runtime/current_thread/mod.rs b/src/runtime/current_thread/mod.rs index b0063f640..57a934c0b 100644 --- a/src/runtime/current_thread/mod.rs +++ b/src/runtime/current_thread/mod.rs @@ -71,6 +71,7 @@ mod runtime; pub use self::builder::Builder; pub use self::runtime::{Runtime, Handle}; +pub use tokio_current_thread::spawn; use futures::Future;