Skip to content

Commit

Permalink
Unrolled build for rust-lang#121530
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#121530 - wgslr:master, r=Mark-Simulacrum

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
rust-timer committed Feb 25, 2024
2 parents 381d699 + 7234c98 commit 5a12f39
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 5a12f39

Please sign in to comment.