Skip to content

Commit 6a4fbe4

Browse files
authored
Rollup merge of rust-lang#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.`
2 parents 9a6ced8 + 2e4215c commit 6a4fbe4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sync/once.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ fn wait(state_and_queue: &AtomicUsize, mut current_state: usize) {
471471
// If the managing thread happens to signal and unpark us before we
472472
// can park ourselves, the result could be this thread never gets
473473
// unparked. Luckily `park` comes with the guarantee that if it got
474-
// an `unpark` just before on an unparked thread is does not park.
474+
// an `unpark` just before on an unparked thread it does not park.
475475
thread::park();
476476
}
477477
break;

0 commit comments

Comments
 (0)