jonJ
Deno16mo ago
7 replies
jon

AsyncLocalStorage without `node:async_hooks`

I'm trying to remove dependencies on node: in a Deno project. I just came across https://github.com/nodejs/node/pull/48528 and I'm wondering if it could unlock AsyncLocalStorage without a dependency on node:async_hooks for Deno.

I am having a bit of a hard time following the various PRs/Github issues, but I also found some fairly recent work that seems related:
https://github.com/denoland/deno/pull/25140
https://github.com/denoland/deno/pull/24402
GitHub
I'm working on rewriting AsyncLocalStorage to use v8::SetContinuationPreservedEmbedderData(...) in a similar model to Cloudflare and in anticipation of the upcoming AsyncContext proposal.
T...
lib: rewrite AsyncLocalStorage without async_hooks by Qard · Pull R...
GitHub
This reverts commit 71ca61e.
Now uses a shared implementation from deno_core.
fix: reland async context by devsnek · Pull Request #25140 · denola...
GitHub
We are switching to ContinuationPreservedEmbedderData. This allows adding async context tracking to the various async operations that deno provides.
Fixes: #7010
Fixes: #22886
Fixes: #24368
feat: async context by devsnek · Pull Request #24402 · denoland/deno
Was this page helpful?