Skip to content

Commit

Permalink
document that only blocking tasks leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah-Kennedy committed Oct 12, 2024
1 parent 85f2c36 commit 017adc9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tokio/src/runtime/local_runtime/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ impl LocalRuntime {
/// Shuts down the runtime, waiting for at most `duration` for all spawned
/// work to stop.
///
/// Note that `spawn_blocking` tasks, and only `spawn_blocking` tasks, can get left behind if
/// the timeout expires.
///
/// See the [struct level documentation](LocalRuntime#shutdown) for more details.
///
/// # Examples
Expand Down Expand Up @@ -333,7 +336,7 @@ impl LocalRuntime {
///
/// Note however, that because we do not wait for any blocking tasks to complete, this
/// may result in a resource leak (in that any blocking tasks are still running until they
/// return.
/// return. No other tasks will leak.
///
/// See the [struct level documentation](LocalRuntime#shutdown) for more details.
///
Expand Down

0 comments on commit 017adc9

Please sign in to comment.