-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Fix(49198): Added missing definition for Atomics.waitAsync and es2022 sharedmemory file #49204
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2f91913
feat(sharedmemory): Added file waitAsync function
Grubba27 cfc496c
fix: Adjusted promise return type
Grubba27 ed95373
Fix(sharedmemory): Addressed PR comments
Grubba27 9609e32
Fix: Removed unused @see at sharedmemory
Grubba27 fd407dc
Feat: Added tests to shared memory
Grubba27 d93edcc
Fix: fixed ordering in libs.json
Grubba27 ce88291
Feat: Added shared memory to line parser
Grubba27 46c08a8
Update tests es2022SharedMemory.ts as sugested
Grubba27 2fcd39d
Update es2022SharedMemory.ts
Grubba27 e93cbe2
feat: Accepted baselines
Grubba27 59e8d62
Merge branch 'microsoft:main' into main
Grubba27 d6f31f7
fix: Adjusted grammar changes in jsdoc
Grubba27 2f13eba
fix(47821): skip nodes with export modifiers (#47829)
a-tarasyuk 0d7fbbb
Use symbolic GitHub Actions Node.js versions (#49403)
jablko 089d001
Merge branch 'main' of github.com:Grubba27/TypeScript into Grubba27-main
sandersn 6330c15
update baselines
sandersn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
interface Atomics { | ||
/** | ||
* A non-blocking, asynchronous version of wait and usable on the main thread. | ||
* Waits asynchronously on a shared memory location and returns a Promise | ||
*/ | ||
waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> }; | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// @target: esnext | ||
// @lib: es2022.sharedmemory | ||
// @noemit: true | ||
// @strict: true | ||
|
||
const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024); | ||
const int32 = new Int32Array(sab); | ||
Atomics.wait(int32, 0, 0); | ||
await Atomics.waitAsync(int32, 0, 0); | ||
Grubba27 marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
Uh oh!
There was an error while loading. Please reload this page.