mirror of https://github.com/tc39/test262.git
more s/wake/notify
This commit is contained in:
parent
d8bbc281dd
commit
1452a22a02
|
@ -20,7 +20,7 @@ features: [Atomics, SharedArrayBuffer, TypedArray]
|
||||||
const WAIT_INDEX = 0; // Index all agents are waiting on
|
const WAIT_INDEX = 0; // Index all agents are waiting on
|
||||||
const RUNNING = 1;
|
const RUNNING = 1;
|
||||||
const NUMAGENT = 2; // Total number of agents started
|
const NUMAGENT = 2; // Total number of agents started
|
||||||
const WAKECOUNT = 2; // Total number of agents to notify up
|
const NOTIFYCOUNT = 2; // Total number of agents to notify up
|
||||||
|
|
||||||
$262.agent.start(`
|
$262.agent.start(`
|
||||||
$262.agent.receiveBroadcast(function(sab) {
|
$262.agent.receiveBroadcast(function(sab) {
|
||||||
|
@ -55,9 +55,9 @@ $262.agent.waitUntil(i32a, RUNNING, NUMAGENT);
|
||||||
$262.agent.tryYield();
|
$262.agent.tryYield();
|
||||||
|
|
||||||
assert.sameValue(
|
assert.sameValue(
|
||||||
Atomics.notify(i32a, WAIT_INDEX, WAKECOUNT),
|
Atomics.notify(i32a, WAIT_INDEX, NOTIFYCOUNT),
|
||||||
WAKECOUNT,
|
NOTIFYCOUNT,
|
||||||
'Atomics.notify(i32a, WAIT_INDEX, WAKECOUNT) returns the value of `WAKECOUNT` (2)'
|
'Atomics.notify(i32a, WAIT_INDEX, NOTIFYCOUNT) returns the value of `NOTIFYCOUNT` (2)'
|
||||||
);
|
);
|
||||||
|
|
||||||
const reports = [];
|
const reports = [];
|
||||||
|
|
Loading…
Reference in New Issue