Skip to content

Commit

Permalink
doc: clarify semantics of tasks outliving block_on (#4729)
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed May 31, 2022
1 parent f948cd7 commit 925314b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tokio/src/runtime/mod.rs
Expand Up @@ -435,6 +435,8 @@ cfg_rt! {
/// When the multi thread scheduler is used this will allow futures
/// to run within the io driver and timer context of the overall runtime.
///
/// Any spawned tasks will continue running after `block_on` returns.
///
/// # Current thread scheduler
///
/// When the current thread scheduler is enabled `block_on`
Expand All @@ -444,6 +446,9 @@ cfg_rt! {
/// When the first `block_on` completes, other threads will be able to
/// "steal" the driver to allow continued execution of their futures.
///
/// Any spawned tasks will be suspended after `block_on` returns. Calling
/// `block_on` again will resume previously spawned tasks.
///
/// # Panics
///
/// This function panics if the provided future panics, or if called within an
Expand Down

0 comments on commit 925314b

Please sign in to comment.