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 9446bb6

Browse filesBrowse files
TrottBethGriggs
authored andcommitted
doc: fix minor issues in async_hooks.md
* easily -> easy * was -> is * add a missing comma PR-URL: #19313 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 5b9af6e commit 9446bb6
Copy full SHA for 9446bb6

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/async_hooks.md‎

Copy file name to clipboardExpand all lines: doc/api/async_hooks.md
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ unintentional side effects.
147147
Because printing to the console is an asynchronous operation, `console.log()`
148148
will cause the AsyncHooks callbacks to be called. Using `console.log()` or
149149
similar asynchronous operations inside an AsyncHooks callback function will thus
150-
cause an infinite recursion. An easily solution to this when debugging is
151-
to use a synchronous logging operation such as `fs.writeSync(1, msg)`. This
152-
will print to stdout because `1` is the file descriptor for stdout and will
153-
not invoke AsyncHooks recursively because it is synchronous.
150+
cause an infinite recursion. An easy solution to this when debugging is to use a
151+
synchronous logging operation such as `fs.writeSync(1, msg)`. This will print to
152+
stdout because `1` is the file descriptor for stdout and will not invoke
153+
AsyncHooks recursively because it is synchronous.
154154

155155
```js
156156
const fs = require('fs');
@@ -593,8 +593,8 @@ JavaScript API so that all the appropriate callbacks are called.
593593

594594
### `class AsyncResource()`
595595

596-
The class `AsyncResource` was designed to be extended by the embedder's async
597-
resources. Using this users can easily trigger the lifetime events of their
596+
The class `AsyncResource` is designed to be extended by the embedder's async
597+
resources. Using this, users can easily trigger the lifetime events of their
598598
own resources.
599599

600600
The `init` hook will trigger when an `AsyncResource` is instantiated.

0 commit comments

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