From 18462e0c1d5f3b3a3e86b7b40fb65975f1e27381 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 14 Sep 2020 12:55:32 -0700 Subject: [PATCH] doc: replace "you should do X" with "do X" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/35194 Reviewed-By: Michaƫl Zasso Reviewed-By: Anna Henningsen --- doc/api/async_hooks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 9f6d61b0285930..7d35800e086e8e 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -1173,14 +1173,14 @@ functions called by `foo`. Outside of `run`, calling `getStore` will return In most cases your application or library code should have no issues with `AsyncLocalStorage`. But in rare cases you may face situations when the -current store is lost in one of asynchronous operations. Then you should +current store is lost in one of asynchronous operations. In those cases, consider the following options. If your code is callback-based, it is enough to promisify it with [`util.promisify()`][], so it starts working with native promises. If you need to keep using callback-based API, or your code assumes -a custom thenable implementation, you should use [`AsyncResource`][] class +a custom thenable implementation, use the [`AsyncResource`][] class to associate the asynchronous operation with the correct execution context. [`AsyncResource`]: #async_hooks_class_asyncresource