Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d4a042

Browse filesBrowse files
targosBethGriggs
authored andcommitted
doc: improve async_context introduction
- Rename "Async_context" to "Asynchronous context tracking" in toc. - Use named imports to show how `AsyncLocalStorage` and `AsyncResource` can be imported. PR-URL: #40560 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
1 parent 7590bac commit 2d4a042
Copy full SHA for 2d4a042

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/async_context.md‎

Copy file name to clipboardExpand all lines: doc/api/async_context.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Asynchronous Context Tracking
1+
# Asynchronous context tracking
22

33
<!--introduced_in=v16.4.0-->
44

@@ -18,11 +18,11 @@ The `AsyncLocalStorage` and `AsyncResource` classes are part of the
1818
`async_hooks` module:
1919

2020
```mjs
21-
import async_hooks from 'async_hooks';
21+
import { AsyncLocalStorage, AsyncResource } from 'async_hooks';
2222
```
2323

2424
```cjs
25-
const async_hooks = require('async_hooks');
25+
const { AsyncLocalStorage, AsyncResource } = require('async_hooks');
2626
```
2727

2828
## Class: `AsyncLocalStorage`
Collapse file

‎doc/api/index.md‎

Copy file name to clipboardExpand all lines: doc/api/index.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<hr class="line"/>
1212

1313
* [Assertion testing](assert.md)
14-
* [Async\_context](async\_context.md)
14+
* [Asynchronous context tracking](async\_context.md)
1515
* [Async hooks](async\_hooks.md)
1616
* [Buffer](buffer.md)
1717
* [C++ addons](addons.md)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.