We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 81e9acf commit c79688fCopy full SHA for c79688f
doc/api/async_hooks.md
@@ -963,6 +963,11 @@ chains. It allows storing data throughout the lifetime of a web request
963
or any other asynchronous duration. It is similar to thread-local storage
964
in other languages.
965
966
+While you can create your own implementation on top of the `async_hooks` module,
967
+`AsyncLocalStorage` should be preferred as it is a performant and memory safe
968
+implementation that involves significant optimizations that are non-obvious to
969
+implement.
970
+
971
The following example uses `AsyncLocalStorage` to build a simple logger
972
that assigns IDs to incoming HTTP requests and includes them in messages
973
logged within each request.
0 commit comments