about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-04-02 21:28:23 +0900
committerGitHub <noreply@github.com>2021-04-02 21:28:23 +0900
commit417e6b1dd024635472840f1c06e14b3f0c2753bc (patch)
treea7c20fd6db23fba4d46110a9091d39567816a8dd
parent080aa37629c123e0f9096de3726f66d80d635be7 (diff)
parent2e4215cb72a256b4843323ea5c9f1552e2c13a43 (diff)
downloadrust-417e6b1dd024635472840f1c06e14b3f0c2753bc.tar.gz
rust-417e6b1dd024635472840f1c06e14b3f0c2753bc.zip
Rollup merge of #83740 - obi1kenobi:patch-1, r=joshtriplett
Fix comment typo in once.rs

I believe I came across a minor typo in a comment. I am not particularly familiar with this part of the codebase, but I have read the surrounding code as well as the referenced `park` and `unpark` functions, and I believe my proposed change is true to the intended meaning of the comment.

I intentionally tried to keep the change as minimal as possible. If I have the maintainers' permission, I'd also love to add a comma to improve readability as follows: `Luckily ``park`` comes with the guarantee that if it got an ``unpark`` just before on an unparked thread, it does not park.`
-rw-r--r--library/std/src/sync/once.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sync/once.rs b/library/std/src/sync/once.rs
index 2e5f843fc43..a24a5cb2ae3 100644
--- a/library/std/src/sync/once.rs
+++ b/library/std/src/sync/once.rs
@@ -471,7 +471,7 @@ fn wait(state_and_queue: &AtomicUsize, mut current_state: usize) {
             // If the managing thread happens to signal and unpark us before we
             // can park ourselves, the result could be this thread never gets
             // unparked. Luckily `park` comes with the guarantee that if it got
-            // an `unpark` just before on an unparked thread is does not park.
+            // an `unpark` just before on an unparked thread it does not park.
             thread::park();
         }
         break;