Skip to content

Commit 6e45e0a

Browse files
vornercarllerche
authored andcommitted
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.
1 parent 82c5baa commit 6e45e0a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/executor/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
//! [`Executor`]: trait.Executor.html
4040
//! [`spawn`]: fn.spawn.html
4141
42-
#[deprecated(since = "0.1.8", note = "use tokio-current-thread crate instead")]
42+
#[deprecated(
43+
since = "0.1.8",
44+
note = "use tokio-current-thread crate or functions in tokio::runtime::current_thread instead",
45+
)]
4346
#[doc(hidden)]
4447
pub mod current_thread;
4548

src/runtime/current_thread/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ mod runtime;
7171

7272
pub use self::builder::Builder;
7373
pub use self::runtime::{Runtime, Handle};
74+
pub use tokio_current_thread::spawn;
7475

7576
use futures::Future;
7677

0 commit comments

Comments
 (0)