diff options
| author | Ryan Dahl <ry@tinyclouds.org> | 2022-06-13 15:28:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-13 21:28:00 +0200 |
| commit | 21dfeea3c48cf6101d71b39a1d2b0f9406818300 (patch) | |
| tree | 0ef0627159ad366d1755081247776b9759b14017 /cli/tests/testdata/worker_drop_handle_race_terminate.js | |
| parent | e6218d9d23f71fe5c42dbd76d3016b147892b476 (diff) | |
Remove unstable Deno.sleepSync (#14719)
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tests/testdata/worker_drop_handle_race_terminate.js')
| -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"); `); |
