diff options
Diffstat (limited to 'test_ffi/tests/thread_safe_test.js')
-rw-r--r-- | test_ffi/tests/thread_safe_test.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test_ffi/tests/thread_safe_test.js b/test_ffi/tests/thread_safe_test.js index 62c78279d..41ab803be 100644 --- a/test_ffi/tests/thread_safe_test.js +++ b/test_ffi/tests/thread_safe_test.js @@ -71,6 +71,8 @@ dylib.symbols.call_stored_function(); // Unref both main and worker thread callbacks and terminate the worker: Note, the stored function pointer in lib is now dangling. +dylib.symbols.store_function(null); + mainThreadCallback.unref(); await sendWorkerMessage("unref"); worker.terminate(); @@ -90,6 +92,9 @@ cleanupCallback.ref(); function cleanup() { cleanupCallback.unref(); + dylib.symbols.store_function(null); + mainThreadCallback.close(); + cleanupCallback.close(); console.log("Isolate should now exit"); } |