Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
10
my-app/node_modules/piscina/test/fixtures/notify-then-sleep-or.ts
generated
vendored
Executable file
10
my-app/node_modules/piscina/test/fixtures/notify-then-sleep-or.ts
generated
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
// Set the index-th bith in i32array[0], then wait for it to be un-set again.
|
||||
module.exports = function ({ i32array, index }) {
|
||||
Atomics.or(i32array, 0, 1 << index);
|
||||
Atomics.notify(i32array, 0, Infinity);
|
||||
do {
|
||||
const v = Atomics.load(i32array, 0);
|
||||
if (!(v & (1 << index))) break;
|
||||
Atomics.wait(i32array, 0, v);
|
||||
} while (true);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue