Skip to content

Commit 6e5f0c7

Browse files
authored
Rollup merge of #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.
2 parents 1c64e78 + 7234c98 commit 6e5f0c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/thread/scoped.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ impl<'scope, T> ScopedJoinHandle<'scope, T> {
311311
/// Checks if the associated thread has finished running its main function.
312312
///
313313
/// `is_finished` supports implementing a non-blocking join operation, by checking
314-
/// `is_finished`, and calling `join` if it returns `false`. This function does not block. To
314+
/// `is_finished`, and calling `join` if it returns `true`. This function does not block. To
315315
/// block while waiting on the thread to finish, use [`join`][Self::join].
316316
///
317317
/// This might return `true` for a brief moment after the thread's main

0 commit comments

Comments
 (0)