Skip to content

Commit

Permalink
Rollup merge of #121530 - wgslr:master, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Fix incorrect doc of ScopedJoinHandle::is_finished

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
matthiaskrgr authored Feb 24, 2024
2 parents a189c89 + 7234c98 commit 106e30e
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 106e30e

Please sign in to comment.