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

17 commits

Author SHA1 Message Date
Bartek Iwańczuk
c6bb3d5a10 remove tokio_util::block_on (#3388)
This PR removes tokio_util::block_on - refactored compiler and file 
fetcher slightly so that we can safely block there - that's because 
only blocking path consist of only synchronous operations.

Additionally I removed excessive use of tokio_util::panic_on_error 
and tokio_util::run_in_task and moved both functions to cli/worker.rs, 
to tests module.

Closes #2960
2019-11-22 12:46:57 -05:00
Bartek Iwańczuk
8f9a942cb9 Use futures 0.3 API (#3358) 2019-11-16 19:17:47 -05:00
Bartek Iwańczuk
415d4c2e52 refactor: rewrite accept resources (#3271) 2019-11-07 09:59:02 -05:00
Bartek Iwańczuk
6c5a981fd2 feat: Deno.listenTLS (#3152) 2019-10-21 14:38:28 -04:00
Bartek Iwańczuk
4221b90c3f perf: eager poll async ops in Isolate (#3046) 2019-10-14 17:46:27 -04:00
Bartek Iwańczuk
41ed4cd34e use single thread runime in tokio_util::block_on (#3080) 2019-10-07 04:31:56 -04:00
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)