mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
doc: clarify semantics of tasks outliving block_on (#4729)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user