Skip to content

Commit aac2464

Browse files
author
Fabrice Bellard
committed
fix worker termination in example (github issue bellard#98)
1 parent c06c399 commit aac2464

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/test_worker_module.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function handle_msg(e) {
1010
switch(ev.type) {
1111
case "abort":
1212
parent.postMessage({ type: "done" });
13+
parent.onMessage = null; /* terminate the worker */
1314
break;
1415
case "sab":
1516
/* modify the SharedArrayBuffer */

0 commit comments

Comments
 (0)