1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
denoland-deno/runtime/ops
Bartek Iwańczuk f3c0f0565b
feat(core): Add ability to "ref" and "unref" pending ops (#12889)
This commit adds an ability to "ref" or "unref" pending ops.

Up to this point Deno had a notion of "async ops" and "unref async ops";
the former keep event loop alive, while the latter do not block event loop
from finishing. It was not possible to change between op types after
dispatching, one had to decide which type to use before dispatch.

Instead of storing ops in two separate "FuturesUnordered" collections,
now ops are stored in a single collection, with supplemental "HashSet"
storing ids of promises that were "unrefed".

Two APIs were added to "Deno.core":

"Deno.core.refOp(promiseId)" which allows to mark promise id
to be "refed" and keep event loop alive (the default behavior)
"Deno.core.unrefOp(promiseId)" which allows to mark promise
id as "unrefed" which won't block event loop from exiting
2021-11-25 19:49:09 +01:00
..
web_worker fix(workers): Make importScripts() use the same HTTP client as fetch (#12540) 2021-10-27 15:09:58 +02:00
fs.rs fix(runtime): require full read and write permissions to create symlinks (#12554) 2021-10-29 17:05:55 -04:00
fs_events.rs fix: support "other" event type in FSWatcher (#12836) 2021-11-23 11:30:24 +01:00
http.rs refactor(ext/http): rewrite hyper integration and fix bug (#12732) 2021-11-10 14:51:43 -08:00
io.rs feat(core): streams (#12596) 2021-11-09 19:26:17 +01:00
mod.rs refactor(metrics): move to core (#12386) 2021-10-10 17:20:30 +02:00
os.rs chore: various op cleanup (#12329) 2021-10-05 22:38:27 +02:00
permissions.rs fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297) 2021-10-13 13:04:44 -04:00
process.rs chore: update to Rust edition 2021 (#12578) 2021-11-02 10:03:37 -04:00
runtime.rs refactor: re-export anyhow from deno_core (#12777) 2021-11-16 09:02:28 -05:00
signal.rs feat(core): Add ability to "ref" and "unref" pending ops (#12889) 2021-11-25 19:49:09 +01:00
tty.rs refactor(ops): return BadResource errors in ResourceTable calls (#11710) 2021-08-15 13:29:19 +02:00
utils.rs chore: update copyright headers (#10243) 2021-04-20 14:27:36 +09:00
web_worker.rs fix(runtime/js/workers): throw errors instead of using an op (#12249) 2021-10-01 11:30:55 +02:00
worker_host.rs fix(runtime/ops/worker_host): move permission arg parsing to Rust (#12297) 2021-10-13 13:04:44 -04:00