diff options
Diffstat (limited to 'test_ffi/tests/thread_safe_test.js')
-rw-r--r-- | test_ffi/tests/thread_safe_test.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test_ffi/tests/thread_safe_test.js b/test_ffi/tests/thread_safe_test.js index 41ab803be..fd5e1840c 100644 --- a/test_ffi/tests/thread_safe_test.js +++ b/test_ffi/tests/thread_safe_test.js @@ -84,7 +84,8 @@ const cleanupCallback = new Deno.UnsafeCallback( { parameters: [], result: "void" }, () => { console.log("Callback being called"); - queueMicrotask(() => cleanup()); + // Defer the cleanup to give the spawned thread all the time it needs to properly shut down + setTimeout(() => cleanup(), 100); }, ); |