From e216256bb4ef8f5c3c772056e60e27ad3b7c605f 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 --- 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 bb739d3a0b363c..79276a6ef93ca9 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'); @@ -587,8 +587,8 @@ like I/O, connection pooling, or managing callback queues may use the ### `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.