Skip to content

Commit ef62889

Browse files
Trottdanielleadams
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 <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
1 parent 1f2a198 commit ef62889

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

doc/api/async_hooks.md

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

1103-
Optionally, arguments can be passed to the function. They will be passed to
1104-
the callback function.
1103+
The optional `args` are passed to the callback function.
11051104

1106-
If the callback function throws an error, it will be thrown by `run` too.
1107-
The stacktrace will not be impacted by this call and the context will
1108-
be exited.
1105+
If the callback function throws an error, the error is thrown by `run()` too.
1106+
The stacktrace is not impacted by this call and the context is exited.
11091107

11101108
Example:
11111109

@@ -1137,12 +1135,10 @@ return value. The store is not accessible within the callback function or
11371135
the asynchronous operations created within the callback. Any `getStore()`
11381136
call done within the callback function will always return `undefined`.
11391137

1140-
Optionally, arguments can be passed to the function. They will be passed to
1141-
the callback function.
1138+
The optional `args` are passed to the callback function.
11421139

1143-
If the callback function throws an error, it will be thrown by `exit` too.
1144-
The stacktrace will not be impacted by this call and the context will be
1145-
re-entered.
1140+
If the callback function throws an error, the error is thrown by `exit()` too.
1141+
The stacktrace is not impacted by this call and the context is re-entered.
11461142

11471143
Example:
11481144

0 commit comments

Comments
 (0)