mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
runtime: add link to LocalSet on new_current_thread (#3508)
This commit is contained in:
@@ -86,6 +86,11 @@ impl Builder {
|
|||||||
/// Returns a new builder with the current thread scheduler selected.
|
/// Returns a new builder with the current thread scheduler selected.
|
||||||
///
|
///
|
||||||
/// Configuration methods can be chained on the return value.
|
/// 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 {
|
pub fn new_current_thread() -> Builder {
|
||||||
Builder::new(Kind::CurrentThread)
|
Builder::new(Kind::CurrentThread)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user