1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
Commit graph

11 commits

Author SHA1 Message Date
Bartek Iwańczuk
61231912e2 fix: panicking when can't create runtime for block_on (#2905) 2019-09-11 20:10:14 -04:00
Bartek Iwańczuk
e7cee29c84 Add --current-thread flag (#2702) 2019-07-31 11:02:20 -04:00
Gurwinder S
bbc8de0c7a Fix typo (#2443) 2019-06-02 14:23:36 -04:00
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
Ryan Dahl
583a646be7
Fix concurrent accepts (#2403) 2019-05-23 21:22:52 +03:00
Ryan Dahl
1af02b405e
Revert "recover: #1517 Kill all pending accepts when TCP listener is closed (#2224)" (#2239)
Crashes while running wrk against
js/deps/https/deno.land/std/http/http_bench.ts

This reverts commit 972ac03858.
2019-04-28 14:15:15 -07:00
Yusuke Sakurai
972ac03858 recover: #1517 Kill all pending accepts when TCP listener is closed (#2224) 2019-04-27 11:33:24 -07:00
Ryan Dahl
675919e915
Use tokio_threadpool's new panic_handler (#2188) 2019-04-23 16:27:44 -04:00
Bert Belder
8477daa8b9
Fix clippy warnings 2019-04-17 15:35:46 +02:00
Ryan Dahl
c7e1f8fabd
Fix silent error, add custom panic handler (#2098)
This is to work around Tokio's panic recovery feature.
Ref https://github.com/tokio-rs/tokio/issues/495
Ref https://github.com/tokio-rs/tokio/issues/209
Ref https://github.com/denoland/deno/issues/1311
Fixes #2097
2019-04-14 16:07:24 -04:00
Ryan Dahl
fa3c35301a
Rename //src/ to //cli/ (#1962)
To better distinguish the deno_core crate from the executable deno,
which will now be called "the cli" internally.
2019-03-19 12:18:05 -04:00
Renamed from src/tokio_util.rs (Browse further)