D
Deno

help

Async execution context

Sshultz9/20/2023
Is there any way I can create a global that is unique to an async operation? I would like to use that for logging operation context. Or maybe just a built in way to get some kind ID of the current operation, as in for each task in the event loop getting a different ID, than I can use regular module context with the ID.
ABTAndreu Botella (they/them)9/20/2023
IIRC you can use Node.js's AsyncLocalStorage in Deno I think that does what you need

Looking for more? Join the community!