diff options
author | Rich Trott <rtrott@gmail.com> | 2018-03-13 07:04:55 +0300 |
---|---|---|
committer | Beth Griggs <Bethany.Griggs@uk.ibm.com> | 2018-10-18 01:57:31 +0300 |
commit | 9446bb68eabb5323daa9c27e1e2442344fccc392 (patch) | |
tree | ddebe3f23f3f529ced6c32afd53df647e7c5e648 /doc | |
parent | 5b9af6ea7379c61098a8b39b28f1b97f30e7ffaa (diff) |
doc: fix minor issues in async_hooks.md
* easily -> easy
* was -> is
* add a missing comma
PR-URL: https://github.com/nodejs/node/pull/19313
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/async_hooks.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index cf9dc46a95d..2b92e4e6b5a 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -147,10 +147,10 @@ unintentional side effects. Because printing to the console is an asynchronous operation, `console.log()` will cause the AsyncHooks callbacks to be called. Using `console.log()` or similar asynchronous operations inside an AsyncHooks callback function will thus -cause an infinite recursion. An easily solution to this when debugging is -to use a synchronous logging operation such as `fs.writeSync(1, msg)`. This -will print to stdout because `1` is the file descriptor for stdout and will -not invoke AsyncHooks recursively because it is synchronous. +cause an infinite recursion. An easy solution to this when debugging is to use a +synchronous logging operation such as `fs.writeSync(1, msg)`. This will print to +stdout because `1` is the file descriptor for stdout and will not invoke +AsyncHooks recursively because it is synchronous. ```js const fs = require('fs'); @@ -593,8 +593,8 @@ JavaScript API so that all the appropriate callbacks are called. ### `class AsyncResource()` -The class `AsyncResource` was designed to be extended by the embedder's async -resources. Using this users can easily trigger the lifetime events of their +The class `AsyncResource` is designed to be extended by the embedder's async +resources. Using this, users can easily trigger the lifetime events of their own resources. The `init` hook will trigger when an `AsyncResource` is instantiated. |