Skip to content

Commit b933452

Browse files
committed
Document ordering bwetween future drop and JoinHandle completion
1 parent 4f577b8 commit b933452

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tokio/src/runtime/task/join.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ cfg_rt! {
2222
/// This `struct` is created by the [`task::spawn`] and [`task::spawn_blocking`]
2323
/// functions.
2424
///
25+
/// It is guaranteed that the spawned task's destructor has finished
26+
/// before the task completion is observed
27+
/// via [`JoinHandle`] `await`, [`JoinHandle::is_finished`] or
28+
/// [`AbortHandle::is_finished](crate::task::AbortHandle::is_finished).
29+
///
2530
/// # Cancel safety
2631
///
2732
/// The `&mut JoinHandle<T>` type is cancel safe. If it is used as the event

0 commit comments

Comments
 (0)