GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add async_hooks migration note · nodejs/node@dde8740

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • async_hooks.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/async_hooks.md‎

Copy file name to clipboardExpand all lines: doc/api/async_hooks.md
+14-1Lines changed: 14 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
<!--introduced_in=v8.1.0-->
44

5-
> Stability: 1 - Experimental
5+
> Stability: 1 - Experimental. Please migrate away from this API, if you can.
6+
> We do not recommend using the [`createHook`][], [`AsyncHook`][], and
7+
> [`executionAsyncResource`][] APIs as they have usability issues, safety risks,
8+
> and performance implications. Async context tracking use cases are better
9+
> served by the stable [`AsyncLocalStorage`][] API. If you have a use case for
10+
> `createHook`, `AsyncHook`, or `executionAsyncResource` beyond the context
11+
> tracking need solved by [`AsyncLocalStorage`][] or diagnostics data currently
12+
> provided by [Diagnostics Channel][], please open an issue at
13+
> <https://github.com/nodejs/node/issues> describing your use case so we can
14+
> create a more purpose-focused API.
615
716
<!-- source_link=lib/async_hooks.js -->
817

@@ -869,14 +878,18 @@ The documentation for this class has moved [`AsyncResource`][].
869878
The documentation for this class has moved [`AsyncLocalStorage`][].
870879
871880
[DEP0111]: deprecations.md#dep0111-processbinding
881+
[Diagnostics Channel]: diagnostics_channel.md
872882
[Hook Callbacks]: #hook-callbacks
873883
[PromiseHooks]: https://docs.google.com/document/d/1rda3yKGHimKIhg5YeoAmCOtyURgsbTH_qaYR79FELlk/edit
884+
[`AsyncHook`]: #class-asynchook
874885
[`AsyncLocalStorage`]: async_context.md#class-asynclocalstorage
875886
[`AsyncResource`]: async_context.md#class-asyncresource
876887
[`Worker`]: worker_threads.md#class-worker
877888
[`after` callback]: #afterasyncid
878889
[`before` callback]: #beforeasyncid
890+
[`createHook`]: #async_hookscreatehookcallbacks
879891
[`destroy` callback]: #destroyasyncid
892+
[`executionAsyncResource`]: #async_hooksexecutionasyncresource
880893
[`init` callback]: #initasyncid-type-triggerasyncid-resource
881894
[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
882895
[`promiseResolve` callback]: #promiseresolveasyncid

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.