1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00
denoland-deno/cli
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 refactor(lsp): migrate from lspower back to tower-lsp (#14163) 2022-04-03 14:17:30 +10:00
compat 1.21.0 (#14336) 2022-04-20 21:50:16 -04:00
dts feat(ext/console): Add string abbreviation size option for "Deno.inspect" (#14384) 2022-04-25 13:59:15 +02:00
lsp fix(test): capture worker stdout and stderr in test output (#14410) 2022-04-26 19:00:04 -04:00
ops fix(test): capture worker stdout and stderr in test output (#14410) 2022-04-26 19:00:04 -04:00
schemas fix(config-file): fix config-file.v1.json schema to allow colons in the task name (#14013) 2022-03-17 13:55:24 -04:00
tests fix(workers): Make worker.terminate() not block the current thread (#13941) 2022-04-27 18:22:47 +02:00
tools refactor: Remove PrettyJsError and js_error_create_fn (#14378) 2022-04-27 01:06:10 +02:00
tsc refactor(lsp): store all the assets in Rust when initializing (#14367) 2022-04-25 11:23:24 -04:00
auth_tokens.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
build.rs fix: cargo publish fails without absolute paths (#13993) 2022-03-17 01:25:44 +01:00
cache.rs chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
Cargo.toml chore: bump crates (#14365) 2022-04-22 16:54:42 +02:00
cdp.rs fix(repl): fix null eval result (#13804) 2022-03-02 13:39:08 +09:00
checksum.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
config_file.rs perf(fmt/lint): incremental formatting and linting (#14314) 2022-04-19 22:14:00 -04:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_dir.rs perf(fmt/lint): incremental formatting and linting (#14314) 2022-04-19 22:14:00 -04:00
diagnostics.rs feat(runtime): two-tier subprocess API (#11618) 2022-04-21 00:20:33 +02:00
diff.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
disk_cache.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
display.rs refactor: add cli/display.rs module (#13879) 2022-03-09 00:19:02 +01:00
emit.rs fix(cli/emit): Check JS roots with // @ts-check (#14090) 2022-04-18 16:52:26 +02:00
errors.rs chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
file_fetcher.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
file_watcher.rs fix(watcher): don't clear screen on start (#14351) 2022-04-21 17:21:59 +02:00
flags.rs feat(repl): add "--eval-file" flag to execute a script file on startup (#14247) 2022-04-20 14:16:37 +02:00
flags_allow_net.rs chore: upgrade clap to v3 (#13266) 2022-01-14 17:38:17 +01:00
fmt_errors.rs refactor: Remove PrettyJsError and js_error_create_fn (#14378) 2022-04-27 01:06:10 +02:00
fs_util.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
graph_util.rs fix(cli/emit): Check JS roots with // @ts-check (#14090) 2022-04-18 16:52:26 +02:00
http_cache.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
http_util.rs chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
lockfile.rs chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
logger.rs chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
main.rs refactor: Remove PrettyJsError and js_error_create_fn (#14378) 2022-04-27 01:06:10 +02:00
module_loader.rs chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
proc_state.rs refactor: Move source map lookups to core (#14274) 2022-04-15 16:08:09 +02:00
README.md Remove deno_typescript (#6813) 2020-07-20 19:49:57 -04:00
resolver.rs chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
standalone.rs refactor: Remove PrettyJsError and js_error_create_fn (#14378) 2022-04-27 01:06:10 +02:00
text_encoding.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
tsc.rs chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
unix_util.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
version.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00
windows_util.rs chore: update copyright to 2022 (#13306) 2022-01-07 22:09:52 -05:00

Deno CLI Crate

crates docs

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.