Skip to content

Commit 31039db

Browse files
Trotttargos
authored andcommitted
doc: revise exit() and run() text in async_hooks.md
Edit for brevity and clarity. Use present tense where possible. PR-URL: #36738 Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
1 parent 844a156 commit 31039db

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Diff for: doc/api/async_hooks.md

+6-10
Original file line numberDiff line numberDiff line change
@@ -1082,12 +1082,10 @@ This methods runs a function synchronously within a context and return its
10821082
return value. The store is not accessible outside of the callback function or
10831083
the asynchronous operations created within the callback.
10841084

1085-
Optionally, arguments can be passed to the function. They will be passed to
1086-
the callback function.
1085+
The optional `args` are passed to the callback function.
10871086

1088-
If the callback function throws an error, it will be thrown by `run` too.
1089-
The stacktrace will not be impacted by this call and the context will
1090-
be exited.
1087+
If the callback function throws an error, the error is thrown by `run()` too.
1088+
The stacktrace is not impacted by this call and the context is exited.
10911089

10921090
Example:
10931091

@@ -1117,12 +1115,10 @@ return value. The store is not accessible within the callback function or
11171115
the asynchronous operations created within the callback. Any `getStore()`
11181116
call done within the callback function will always return `undefined`.
11191117

1120-
Optionally, arguments can be passed to the function. They will be passed to
1121-
the callback function.
1118+
The optional `args` are passed to the callback function.
11221119

1123-
If the callback function throws an error, it will be thrown by `exit` too.
1124-
The stacktrace will not be impacted by this call and the context will be
1125-
re-entered.
1120+
If the callback function throws an error, the error is thrown by `exit()` too.
1121+
The stacktrace is not impacted by this call and the context is re-entered.
11261122

11271123
Example:
11281124

0 commit comments

Comments
 (0)