From 21dfeea3c48cf6101d71b39a1d2b0f9406818300 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 13 Jun 2022 15:28:00 -0400 Subject: Remove unstable Deno.sleepSync (#14719) Co-authored-by: David Sherret --- cli/tests/testdata/worker_drop_handle_race_terminate.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cli/tests/testdata') 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"); `); -- cgit v1.2.3