1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/cli
Ryan Dahl 53b6356ec5 Correct tokio_util::block_on() and op_fetch_module_meta_data
op_fetch_module_meta_data is an op that is used by the TypeScript
compiler. TypeScript requires this op to be sync. However the
implementation of the op does things on the event loop (like fetching
HTTP resources).

In certain situations this can lead to deadlocks. The runtime's thread
pool can be filled with ops waiting on the result of
op_fetch_module_meta_data. The runtime has a maximum number of
threads it can use (the number of logical CPUs on the system).

This patch changes tokio_util::block_on to launch a new Tokio runtime
for evaluating the future, thus bipassing the max-thread problem.

This is only an issue in op_fetch_module_meta_data. Other synchronous
ops are truly synchornous, not interacting with the event loop.  TODO
comments are added to direct future development.
2019-05-29 07:53:39 -04:00
..
ansi.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
BUILD.gn add EventTarget implementation (#2377) 2019-05-27 09:20:34 -04:00
build.rs Call ninja directly from build.rs (#2020) 2019-03-30 19:27:00 -04:00
Cargo.toml v0.6.0 2019-05-20 15:22:08 -04:00
compiler.rs Add progress bar (#2309) 2019-05-11 10:23:19 -04:00
deno_dir.rs Add progress bar (#2309) 2019-05-11 10:23:19 -04:00
dispatch_minimal.rs Add error handling to dispatch_minimal::ops::read/write (#2349) 2019-05-15 14:50:54 -04:00
errors.rs Add error handling to dispatch_minimal::ops::read/write (#2349) 2019-05-15 14:50:54 -04:00
flags.rs typo (#2366) 2019-05-24 14:36:50 +03:00
fs.rs Add Deno.chown (#2292) 2019-05-07 21:58:57 -04:00
global_timer.rs Fix clippy errors and upgrade Rust to 1.33.0 in CI (#1945) 2019-03-20 18:55:52 -04:00
http_body.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
http_util.rs Silence clippy warnings and format source code 2019-04-09 20:05:47 +02:00
js_errors.rs Rename crate deno_core to deno (#2022) 2019-03-30 19:30:40 -04:00
main.rs add module and line no for Rust logger (#2409) 2019-05-25 19:23:47 +03:00
msg.fbs Rename --allow-high-precision to --allow-hrtime (#2398) 2019-05-23 19:28:29 +03:00
msg.rs Add progress bar (#2309) 2019-05-11 10:23:19 -04:00
msg_util.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
ops.rs Correct tokio_util::block_on() and op_fetch_module_meta_data 2019-05-29 07:53:39 -04:00
permissions.rs Rename --allow-high-precision to --allow-hrtime (#2398) 2019-05-23 19:28:29 +03:00
progress.rs Add progress bar (#2309) 2019-05-11 10:23:19 -04:00
repl.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
resolve_addr.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
resources.rs Fix concurrent accepts (#2403) 2019-05-23 21:22:52 +03:00
signal.rs Add Deno.kill(pid, signo) and process.kill(signo) (Unix only) (#2177) 2019-04-21 21:26:56 -04:00
startup_data.rs Use correct type for source_bytes when buiding in check-only mode 2019-04-09 20:05:47 +02:00
state.rs Add progress bar (#2309) 2019-05-11 10:23:19 -04:00
tokio_util.rs Correct tokio_util::block_on() and op_fetch_module_meta_data 2019-05-29 07:53:39 -04:00
tokio_write.rs Rename //src/ to //cli/ (#1962) 2019-03-19 12:18:05 -04:00
version.rs Rename crate deno_core to deno (#2022) 2019-03-30 19:30:40 -04:00
worker.rs Add progress bar (#2309) 2019-05-11 10:23:19 -04:00