diff options
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r-- | cli/tests/testdata/worker_drop_handle_race_terminate.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/testdata/worker_drop_handle_race_terminate.js b/cli/tests/testdata/worker_drop_handle_race_terminate.js index fc9a4e6b2..93c324fdf 100644 --- a/cli/tests/testdata/worker_drop_handle_race_terminate.js +++ b/cli/tests/testdata/worker_drop_handle_race_terminate.js @@ -13,10 +13,10 @@ const WORKER2 = getCodeBlobUrl(` console.log("Worker 2"); self.postMessage(undefined); - // We sleep for slightly under 2 seconds in order to make sure that worker 1 - // has closed, and that this worker's thread finishes normally rather than - // being killed (which happens 2 seconds after calling terminate). - Deno.sleepSync(1800); + // We sleep synchronously for slightly under 2 seconds in order to make sure + // that worker 1 has closed, and that this worker's thread finishes normally + // rather than being killed (which happens 2 seconds after calling terminate). + Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 1800); console.log("Finished sleeping in worker 2"); `); |