Óscar
Detect when the event loop is finished in a Worker
When Deno executes a script, once the script is finalized, the process is terminated. Is there any way to detect that inside a worker? I know I can call
self.close()
to terminate the worker, but I want to wait until all timers are closed (unawaited promises, etc) and the event loop is clean. Deno does it automatically in the main script, but I don't know if there's a way to detect this state inside a Worker.4 replies
What is the best way to count values with Deno.Kv?
I want to show the total values in the database. It seems that the only way is with
kv.list()
and then iterate the values.
Probably this is not very performant if I only want to count the results. I'd like to have something like this:
3 replies
Dynamic npm imports don't work
Hey there.
It looks like dynamic imports don't work with
npm
specifiers. For example:
I din't see anything in the npm roadmap (https://github.com/denoland/deno/issues/15960) so I wonder if this is planned.4 replies