mirror of https://github.com/tc39/test262.git
Atomics: simplify harness/atomicsHelper.js: waitUntil
This commit is contained in:
parent
64be6186be
commit
be21156542
|
@ -36,10 +36,10 @@ function getReport() {
|
|||
* @param {Number} expected The number of agents that are expected to report as active.
|
||||
*/
|
||||
function waitUntil(i32a, index, expected) {
|
||||
while (Atomics.load(i32a, index) !== expected) {
|
||||
let agents = 0;
|
||||
while ((agents = Atomics.load(i32a, index)) !== expected) {
|
||||
/* nothing */
|
||||
}
|
||||
const agents = Atomics.load(i32a, index);
|
||||
assert.sameValue(agents, expected, `'agents' equals the value of 'expected' (${expected})`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue