Skip to content

Commit

Permalink
Fix incorrect doc of ScopedJoinHandle::is_finished
Browse files Browse the repository at this point in the history
Fixes the explanation how to use is_finished to achieve a non-blocking
join. The updated version matches the documentation of the non-scoped
JoinHandle::is_finished.
  • Loading branch information
wgslr committed Feb 23, 2024
1 parent de4d615 commit 7234c98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/thread/scoped.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ impl<'scope, T> ScopedJoinHandle<'scope, T> {
/// Checks if the associated thread has finished running its main function.
///
/// `is_finished` supports implementing a non-blocking join operation, by checking
/// `is_finished`, and calling `join` if it returns `false`. This function does not block. To
/// `is_finished`, and calling `join` if it returns `true`. This function does not block. To
/// block while waiting on the thread to finish, use [`join`][Self::join].
///
/// This might return `true` for a brief moment after the thread's main
Expand Down

0 comments on commit 7234c98

Please sign in to comment.