From 9446bb68eabb5323daa9c27e1e2442344fccc392 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 12 Mar 2018 21:04:55 -0700 Subject: [PATCH] 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 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- doc/api/async_hooks.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index cf9dc46a95d60d..2b92e4e6b5adbc 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.