From aac24640b13825b550d3e6dbce0a3f9ac8baf577 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 8 Jan 2024 18:41:03 +0100 Subject: [PATCH] fix worker termination in example (github issue #98) --- tests/test_worker_module.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_worker_module.js b/tests/test_worker_module.js index c783e1f..f19600a 100644 --- a/tests/test_worker_module.js +++ b/tests/test_worker_module.js @@ -10,6 +10,7 @@ function handle_msg(e) { switch(ev.type) { case "abort": parent.postMessage({ type: "done" }); + parent.onMessage = null; /* terminate the worker */ break; case "sab": /* modify the SharedArrayBuffer */