We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
flavor
spawn_local
1 parent e1117ec commit 8c3d838Copy full SHA for 8c3d838
tokio/src/task/local.rs
@@ -326,6 +326,14 @@ impl<'a> Drop for LocalDataEnterGuard<'a> {
326
cfg_rt! {
327
/// Spawns a `!Send` future on the current [`LocalSet`] or [`LocalRuntime`].
328
///
329
+ /// This is possible when either using one of these types
330
+ /// explicitly, or (with `tokio_unstable`) by opting to use the
331
+ /// `"local"` runtime flavor in [`tokio::main`]:
332
+ ///
333
+ /// ```ignore
334
+ /// #[tokio::main(flavor = "local")]
335
+ /// ```
336
337
/// The spawned future will run on the same thread that called `spawn_local`.
338
339
/// The provided future will start running in the background immediately
0 commit comments