Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2021-01-02 17:15:38 +0300
committerRich Trott <rtrott@gmail.com>2021-01-06 07:50:19 +0300
commitdd14dbaa6c24a69aac1a1929ee8801607e1fcf4a (patch)
treedcea00a10ec5ef8e46164b0b48a856cb19ca47be /doc/api/async_hooks.md
parentfcf62269df20839edeb7da6b52506280f1229ffb (diff)
doc: revise exit() and run() text in async_hooks.md
Edit for brevity and clarity. Use present tense where possible. PR-URL: https://github.com/nodejs/node/pull/36738 Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r--doc/api/async_hooks.md16
1 files changed, 6 insertions, 10 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md
index 464d0de9e00..9a46b41d7f4 100644
--- a/doc/api/async_hooks.md
+++ b/doc/api/async_hooks.md
@@ -1100,12 +1100,10 @@ This methods runs a function synchronously within a context and return its
return value. The store is not accessible outside of the callback function or
the asynchronous operations created within the callback.
-Optionally, arguments can be passed to the function. They will be passed to
-the callback function.
+The optional `args` are passed to the callback function.
-If the callback function throws an error, it will be thrown by `run` too.
-The stacktrace will not be impacted by this call and the context will
-be exited.
+If the callback function throws an error, the error is thrown by `run()` too.
+The stacktrace is not impacted by this call and the context is exited.
Example:
@@ -1137,12 +1135,10 @@ return value. The store is not accessible within the callback function or
the asynchronous operations created within the callback. Any `getStore()`
call done within the callback function will always return `undefined`.
-Optionally, arguments can be passed to the function. They will be passed to
-the callback function.
+The optional `args` are passed to the callback function.
-If the callback function throws an error, it will be thrown by `exit` too.
-The stacktrace will not be impacted by this call and the context will be
-re-entered.
+If the callback function throws an error, the error is thrown by `exit()` too.
+The stacktrace is not impacted by this call and the context is re-entered.
Example: