1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00
denoland-deno/cli/tests/integration
Andreu Botella ba799b6729
fix(workers): Make worker.terminate() not block the current thread (#13941)
Calling `worker.terminate()` used to kill the worker's isolate and
then block until the worker's thread finished. This blocks the calling
thread if the worker's event loop was blocked in a sync op (as with
`Deno.sleepSync`), which wasn't realized at the time, but since the
worker's isolate was killed at that moment, it would not block the
calling thread if the worker was in a JS endless loop.

However, in #12831, in order to work around a V8 bug, worker
termination was changed to first set a signal to let the worker event
loop know that termination has been requested, and only kill the
isolate if the event loop has not finished after 2 seconds. However,
this change kept the blocking, which meant that JS endless loops in
the worker now blocked the parent for 2 seconds.

As it turns out, after #12831 it is fine to signal termination and
even kill the worker's isolate without waiting for the thread to
finish, so this change does that. However, that might leave the async
ops that receive messages and control data from the worker pending
after `worker.terminate()`, which leads to odd results from the op
sanitizer. Therefore, we set up a `CancelHandler` to cancel those ops
when the worker is terminated.
2022-04-27 18:22:47 +02:00
..
bench_tests.rs fix(bench): report pending summary before clearing (#14369) 2022-04-23 14:20:28 +02:00
bundle_tests.rs feat: Add "deno check" subcommand for type checking (#14072) 2022-04-11 01:12:51 +02:00
cache_tests.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
check_tests.rs feat: Add "deno check" subcommand for type checking (#14072) 2022-04-11 01:12:51 +02:00
compat_tests.rs disable flakes (#13962) 2022-03-15 11:19:59 -04:00
compile_tests.rs refactor: Remove PrettyJsError and js_error_create_fn (#14378) 2022-04-27 01:06:10 +02:00
coverage_tests.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
doc_tests.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
eval_tests.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
fmt_tests.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
info_tests.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
inspector_tests.rs feat: Add "deno check" subcommand for type checking (#14072) 2022-04-11 01:12:51 +02:00
install_tests.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
lint_tests.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
lsp_tests.rs refactor(lsp): migrate from lspower back to tower-lsp (#14163) 2022-04-03 14:17:30 +10:00
mod.rs feat(test): format user code output (#14271) 2022-04-15 14:24:41 +02:00
repl_tests.rs chore: fix pty_complete_imports test (#14400) 2022-04-26 09:53:22 -04:00
run_tests.rs fix(workers): Make worker.terminate() not block the current thread (#13941) 2022-04-27 18:22:47 +02:00
task_tests.rs feat(task): add unstable warning to deno task (#13966) 2022-03-15 21:24:07 -04:00
test_tests.rs fix(test): capture worker stdout and stderr in test output (#14410) 2022-04-26 19:00:04 -04:00
upgrade_tests.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
vendor_tests.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
watcher_tests.rs fix(watcher): don't clear screen on start (#14351) 2022-04-21 17:21:59 +02:00
worker_tests.rs refactor: Remove PrettyJsError and js_error_create_fn (#14378) 2022-04-27 01:06:10 +02:00