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