Repository navigation
Atomics.wait()/waitAsync() improvements - #39679
Merged
Merged
Conversation
hamishwillee
requested review from
a team and
Josh-Cena
and removed request for
a team
May 26, 2025 06:48
hamishwillee
commented
May 26, 2025
Contributor
|
Preview URLs
(comment last updated: 2025-05-27 10:05:56) |
hamishwillee
commented
May 26, 2025
| method verifies that a shared memory location still contains a | ||
| given value and if so sleeps, awaiting a wake-up notification or times out. It returns a string which | ||
| is either `"ok"`, `"not-equal"`, or `"timed-out"`. | ||
| The **`Atomics.wait()`** static method verifies that a shared memory location contains a given value and if so sleeps, awaiting a wake-up notification or a time out. |
Collaborator
Author
There was a problem hiding this comment.
This method doc I just didn't find very clear. In particular we were a bit unclear about "may not be used in main thread". If it throws an exception, it can't.
hamishwillee
commented
May 26, 2025
hamishwillee
commented
May 26, 2025
8 tasks done
Josh-Cena
requested changes
May 26, 2025
hamishwillee
force-pushed
the
ff140_atomics_waitasync_doc
branch
from
May 27, 2025 01:24
ec439ef to
717d204
Compare
hamishwillee
commented
May 27, 2025
hamishwillee
commented
May 27, 2025
Josh-Cena
approved these changes
May 27, 2025
Josh-Cena
left a comment
Member
There was a problem hiding this comment.
Thanks! I made some tiny tweaks to the wording
zachernuk
pushed a commit
to zachernuk/content
that referenced
this pull request
Jun 4, 2025
* Atomics.wait()/waitAsync() improvements * Update files/en-us/web/javascript/reference/global_objects/atomics/wait/index.md * Update files/en-us/web/javascript/reference/global_objects/atomics/wait/index.md * Remove the note * waitAsync returns and object * Update files/en-us/web/javascript/reference/global_objects/atomics/wait/index.md * Apply suggestions from code review * Update index.md * Update index.md * Update index.md --------- Co-authored-by: Joshua Chen <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves the docs for
Atomics.waitAsync()andAtomics.wait(). I found them a little unclear. I think it helps to link tonotify()earlier.Notes about what/why inline
Related docs work can be tracked in #39615