Lines Matching defs:id
76 var id = msg.id;
78 Atomics.store(ta, id, 1);
79 postMessage(id);
85 var id;
87 for (id = 0; id < 4; ++id) {
88 workers[id] = new Worker(workerScript);
89 workers[id].postMessage({sab: sab, id: id}, [sab]);
92 // Spinwait for each worker to update ta[id]
95 for (id = 0; id < 4; ++id) {
96 if (Atomics.compareExchange(ta, id, 1, -1) == 1) {
98 assertEquals(id, workers[id].getMessage());
99 workers[id].terminate();