diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-02-24 22:39:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-24 22:39:00 +0100 |
| commit | 106e30ed4157827d1ba4b9bb9edd3f0cacbe04de (patch) | |
| tree | 1db1a10bdf2a2610b8b81ac088c46fec5adc2c49 | |
| parent | a189c8962a3a0fb28319790964cf836585b61f9b (diff) | |
| parent | 7234c9893ded40e746877be7d5e4c53a606b36a1 (diff) | |
| download | rust-106e30ed4157827d1ba4b9bb9edd3f0cacbe04de.tar.gz rust-106e30ed4157827d1ba4b9bb9edd3f0cacbe04de.zip | |
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.
| -rw-r--r-- | library/std/src/thread/scoped.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/thread/scoped.rs b/library/std/src/thread/scoped.rs index ada69aa8269..7b11e7c17b1 100644 --- a/library/std/src/thread/scoped.rs +++ b/library/std/src/thread/scoped.rs @@ -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 |
