mirror of https://github.com/tc39/test262.git
Atomics: further nit picking
This commit is contained in:
parent
7389389071
commit
22d3877a2a
|
@ -24,13 +24,12 @@ function getReport() {
|
|||
return r;
|
||||
}
|
||||
|
||||
$262.agent.start(
|
||||
`
|
||||
$262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab) {
|
||||
var i32a = new Int32Array(sab);
|
||||
$262.agent.report(Atomics.wait(i32a, 0, 0, NaN)); // NaN => +Infinity
|
||||
$262.agent.leaving();
|
||||
})
|
||||
});
|
||||
`);
|
||||
|
||||
var i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));
|
||||
|
|
|
@ -23,8 +23,8 @@ const i32a = new Int32Array(
|
|||
$262.agent.start(`
|
||||
$262.agent.receiveBroadcast(function(sab) {
|
||||
var i32a = new Int32Array(sab);
|
||||
var before = $262.agent.monotonicNow();
|
||||
$262.agent.report("ready");
|
||||
var before = $262.agent.monotonicNow();
|
||||
Atomics.wait(i32a, 0, 0, ${TWO_SECOND_TIMEOUT});
|
||||
$262.agent.report($262.agent.monotonicNow() - before);
|
||||
$262.agent.leaving();
|
||||
|
|
|
@ -18,7 +18,7 @@ $262.agent.receiveBroadcast(function(sab, id) {
|
|||
var diff = $262.agent.monotonicNow() - then; // Should be about 1000 ms but can be more
|
||||
$262.agent.report(diff);
|
||||
$262.agent.leaving();
|
||||
})
|
||||
});
|
||||
`);
|
||||
|
||||
var i32a = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));
|
||||
|
|
Loading…
Reference in New Issue