mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
f3c0f0565b
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 |
||
---|---|---|
.. | ||
web_worker | ||
fs.rs | ||
fs_events.rs | ||
http.rs | ||
io.rs | ||
mod.rs | ||
os.rs | ||
permissions.rs | ||
process.rs | ||
runtime.rs | ||
signal.rs | ||
tty.rs | ||
utils.rs | ||
web_worker.rs | ||
worker_host.rs |