From 7234c9893ded40e746877be7d5e4c53a606b36a1 Mon Sep 17 00:00:00 2001 From: Wojciech Geisler Date: Sat, 24 Feb 2024 00:34:40 +0200 Subject: [PATCH] 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. --- library/std/src/thread/scoped.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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