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.
1 parent 6b076a2 commit 657fd88Copy full SHA for 657fd88
tokio/src/task/spawn.rs
@@ -15,6 +15,10 @@ cfg_rt! {
15
/// different thread to be executed. The specifics depend on the current
16
/// [`Runtime`](crate::runtime::Runtime) configuration.
17
///
18
+ /// It is guaranteed that spawn will not synchronously poll the task being spawned.
19
+ /// This means that calling spawn while holding a lock does not pose a risk of
20
+ /// deadlocking with the spawned task.
21
+ ///
22
/// There is no guarantee that a spawned task will execute to completion.
23
/// When a runtime is shutdown, all outstanding tasks are dropped,
24
/// regardless of the lifecycle of that task.
0 commit comments