async_hooks: avoid unneeded AsyncResource creation · nodejs/node@0a44017 · GitHub
Skip to content

Commit 0a44017

Browse files
Flarnaaddaleax
authored andcommitted
async_hooks: avoid unneeded AsyncResource creation
Inspired by the callstack at #34556 (comment) If the wanted store is equal to the active store it's not needed to create an AsyncResource. Refs: #34556 (comment) PR-URL: #34616 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
1 parent 07968ac commit 0a44017

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

lib/async_hooks.js

Lines changed: 5 additions & 0 deletions

test/async-hooks/test-async-local-storage-run-resource.js

Lines changed: 15 additions & 2 deletions

0 commit comments

Comments
 (0)