-
Notifications
You must be signed in to change notification settings - Fork 12.9k
lib: narrow Atomics.wait*
target to SharedArrayBuffer views
#61817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
lib: narrow Atomics.wait*
target to SharedArrayBuffer views
#61817
Conversation
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
@typescript-bot test it |
Hey @jakebailey, the results of running the DT tests are ready. Everything looks the same! |
@jakebailey Here are the results of running the user tests with tsc comparing Everything looks good! |
@jakebailey Here they are:
tscComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top 400 repos with tsc comparing Everything looks good! |
The
Atomics.wait*
methods only accept views over SharedArrayBuffers, and will throw a TypeError if passed a view on an ArrayBuffer. Since #59417, it's now possible to express this in the method declarations.This change seems like it should have a favourable utility-to-annoyance ratio, but it would be interesting to see what the user tests say.
(The same does not apply to
Atomics.notify()
, since although it's a no-op if passed a non-shared view, it accepts the argument and completes gracefully.)