deno
4a13c320 - fix(workers): Make `worker.terminate()` not immediately kill the isolate (#12831)

Commit
4 years ago
fix(workers): Make `worker.terminate()` not immediately kill the isolate (#12831) Due to a bug in V8, terminating an isolate while a module with top-level await is being evaluated would crash the process. This change makes it so calling `worker.terminate()` will signal the worker to terminate at the next iteration of the event loop, and it schedules a proper termination of the worker's isolate after 2 seconds.
Author
Andreu Botella
Parents
Loading