Last active
March 26, 2022 12:28
-
-
Save yskszk63/f2517863d7254e5d3a7be3d0f38aa00f to your computer and use it in GitHub Desktop.
Never settled `await Atomics.waitAsync`
This file contains 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
const buf = new Int32Array(new SharedArrayBuffer(4)); | |
const r = await Atomics.waitAsync(buf, 0, 0); | |
if (!r.async) { throw new Error(); } | |
console.log("BEGIN"); | |
const r2 = await r.value; | |
console.log("DONE:", r2); // unreachable! | |
// ```bash | |
// $ node ./run.mjs | |
// BEGIN | |
// ``` |
$ deno run ./run.mjs
BEGIN
error: Module evaluation is still pending but there are no pending ops or dynamic imports. This situation is often caused by unresolved promis
es.
$ deno --version
deno 1.20.3 (release, x86_64-unknown-linux-gnu)
v8 10.0.139.6
typescript 4.6.2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
node --version