blob: 1fc20e5b7d79a47dcd189bebcbcbad290149a07a [file] [edit]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- webkit-test-runner [ jscOptions=--useSharedArrayBuffer=true ] -->
<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>