Skip to content

Commit

Permalink
doc: remove "note that" from async_hooks.md
Browse files Browse the repository at this point in the history
PR-URL: #28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott authored and targos committed Jul 2, 2019
1 parent 9ca7c86 commit d384911
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const asyncHook = async_hooks.createHook({
});
```

Note that the callbacks will be inherited via the prototype chain:
The callbacks will be inherited via the prototype chain:

```js
class MyAsyncCallbacks {
Expand Down Expand Up @@ -439,7 +439,7 @@ added: v8.6.0
Called when the `resolve` function passed to the `Promise` constructor is
invoked (either directly or through other means of resolving a promise).

Note that `resolve()` does not do any observable synchronous work.
`resolve()` does not do any observable synchronous work.

The `Promise` is not necessarily fulfilled or rejected at this point if the
`Promise` was resolved by assuming the state of another `Promise`.
Expand Down Expand Up @@ -497,7 +497,7 @@ const server = net.createServer((conn) => {
});
```

Note that promise contexts may not get precise `executionAsyncIds` by default.
Promise contexts may not get precise `executionAsyncIds` by default.
See the section on [promise execution tracking][].

#### async_hooks.triggerAsyncId()
Expand All @@ -520,7 +520,7 @@ const server = net.createServer((conn) => {
});
```

Note that promise contexts may not get valid `triggerAsyncId`s by default. See
Promise contexts may not get valid `triggerAsyncId`s by default. See
the section on [promise execution tracking][].

## Promise execution tracking
Expand All @@ -540,7 +540,7 @@ Promise.resolve(1729).then(() => {
```

Observe that the `then()` callback claims to have executed in the context of the
outer scope even though there was an asynchronous hop involved. Also note that
outer scope even though there was an asynchronous hop involved. Also,
the `triggerAsyncId` value is `0`, which means that we are missing context about
the resource that caused (triggered) the `then()` callback to be executed.

Expand Down

0 comments on commit d384911

Please sign in to comment.