Skip to content
Snippets Groups Projects
Commit be211565 authored by Rick Waldron's avatar Rick Waldron
Browse files

Atomics: simplify harness/atomicsHelper.js: waitUntil

parent 64be6186
No related branches found
No related tags found
No related merge requests found
......@@ -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})`);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment