esource('request');
  // The listener will always run in the execution context of `asyncResource`.
  req.on('close', asyncResource.runInAsyncScope.bind(asyncResource, () => {
    // Prints: true
    console.log(asyncResource.asyncId() === executionAsyncId());
  }));
  res.end();
}).listen(3000);
</code></pre>
<h2>Class: <code>AsyncLocalStorage</code><span><a class="mark" href="#async_hooks_class_asynclocalstorage" id="async_hooks_class_asynclocalstorage">#</a></span></h2>
<div class="api_metadata">
<span>Ad