From 65bef65bc79a05bfca590b09c16d1dbf1d23f810 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Sat, 6 Feb 2021 18:27:44 +0100 Subject: [PATCH] runtime: add link to LocalSet on new_current_thread --- tokio/src/runtime/builder.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs index e845192977e..33b63e1fe66 100644 --- a/tokio/src/runtime/builder.rs +++ b/tokio/src/runtime/builder.rs @@ -86,6 +86,11 @@ impl Builder { /// Returns a new builder with the current thread scheduler selected. /// /// Configuration methods can be chained on the return value. + /// + /// To spawn non-`Send` tasks on the resulting runtime, combine it with a + /// [`LocalSet`]. + /// + /// [`LocalSet`]: crate::task::LocalSet pub fn new_current_thread() -> Builder { Builder::new(Kind::CurrentThread) }