| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script src =../resources/testharness.js></script> |
| <script src =../resources/testharnessreport.js></script> |
| <script> |
| description("Test to ensure Atomics.waitAsync is invocable on the main thread"); |
| |
| promise_test(async t => { |
| const buffer = new SharedArrayBuffer(1024); |
| const array = new Int32Array(buffer); |
| await Atomics.waitAsync(array, 0, 1).value; |
| }, "Atomics.waitAsync can return immediately from the main thread"); |
| |
| </script> |
| <script src="../resources/js-test-post.js"></script> |
| </body> |
| </html> |