doc: clarify semantics of tasks outliving block_on (#4729)

This commit is contained in:
Aleksey Kladov
2022-05-31 19:08:53 +00:00
committed by GitHub
parent f948cd7b33
commit 925314ba43
+5
View File
@@ -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`
@@ -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