diff options
author | Rich Trott <rtrott@gmail.com> | 2022-03-30 18:58:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-30 18:58:03 +0300 |
commit | 85f679fff101e86051dab5ab21359399b3dde9ae (patch) | |
tree | dae8ba5e95e329429a5fda79f246d333ce67ec53 /doc/api/async_hooks.md | |
parent | eb3ca87a87283c5d7968f980ac3b126ac0c0495e (diff) |
doc: fix comment text in async_hooks example
PR-URL: https://github.com/nodejs/node/pull/42499
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Mestery <mestery@protonmail.com>
Diffstat (limited to 'doc/api/async_hooks.md')
-rw-r--r-- | doc/api/async_hooks.md | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/api/async_hooks.md b/doc/api/async_hooks.md index 9582db77da8..4a6af435299 100644 --- a/doc/api/async_hooks.md +++ b/doc/api/async_hooks.md @@ -59,24 +59,24 @@ asyncHook.disable(); // The following are the callbacks that can be passed to createHook(). // -// init is called during object construction. The resource may not have -// completed construction when this callback runs, therefore all fields of the +// init() is called during object construction. The resource may not have +// completed construction when this callback runs. Therefore, all fields of the // resource referenced by "asyncId" may not have been populated. function init(asyncId, type, triggerAsyncId, resource) { } -// Before is called just before the resource's callback is called. It can be +// before() is called just before the resource's callback is called. It can be // called 0-N times for handles (such as TCPWrap), and will be called exactly 1 // time for requests (such as FSReqCallback). function before(asyncId) { } -// After is called just after the resource's callback has finished. +// after() is called just after the resource's callback has finished. function after(asyncId) { } -// Destroy is called when the resource is destroyed. +// destroy() is called when the resource is destroyed. function destroy(asyncId) { } -// promiseResolve is called only for promise resources, when the -// `resolve` function passed to the `Promise` constructor is invoked +// promiseResolve() is called only for promise resources, when the +// resolve() function passed to the Promise constructor is invoked // (either directly or through other means of resolving a promise). function promiseResolve(asyncId) { } ``` @@ -107,24 +107,24 @@ asyncHook.disable(); // The following are the callbacks that can be passed to createHook(). // -// init is called during object construction. The resource may not have -// completed construction when this callback runs, therefore all fields of the +// init() is called during object construction. The resource may not have +// completed construction when this callback runs. Therefore, all fields of the // resource referenced by "asyncId" may not have been populated. function init(asyncId, type, triggerAsyncId, resource) { } -// Before is called just before the resource's callback is called. It can be +// before() is called just before the resource's callback is called. It can be // called 0-N times for handles (such as TCPWrap), and will be called exactly 1 // time for requests (such as FSReqCallback). function before(asyncId) { } -// After is called just after the resource's callback has finished. +// after() is called just after the resource's callback has finished. function after(asyncId) { } -// Destroy is called when the resource is destroyed. +// destroy() is called when the resource is destroyed. function destroy(asyncId) { } -// promiseResolve is called only for promise resources, when the -// `resolve` function passed to the `Promise` constructor is invoked +// promiseResolve() is called only for promise resources, when the +// resolve() function passed to the Promise constructor is invoked // (either directly or through other means of resolving a promise). function promiseResolve(asyncId) { } ``` |