mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
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.
This commit is contained in:
parent
5178e093ed
commit
4a13c320d7
4 changed files with 96 additions and 21 deletions
|
@ -99,3 +99,8 @@ itest!(worker_permissions_blob_local {
|
|||
http_server: true,
|
||||
exit_code: 1,
|
||||
});
|
||||
|
||||
itest!(worker_terminate_tla_crash {
|
||||
args: "run --quiet --reload workers/terminate_tla_crash.js",
|
||||
output: "workers/terminate_tla_crash.js.out",
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue