Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
0b0cd8d
test: correct header length subtraction
Trott Nov 29, 2019
4e93f23
doc: update socket.bufferSize text
Trott Nov 30, 2019
827c53b
doc: update README.md to fix active/maint times
mhdawson Nov 28, 2019
50a54ce
doc: update signature algorithm in release doc
MylesBorins Nov 26, 2019
043163a
doc: revise REPL uncaught exception text
Trott Nov 30, 2019
2aa8654
test: fix test-benchmark-streams
Trott Dec 2, 2019
6c6ffdd
test: use arrow functions in async-hooks tests
GaryGSC Oct 26, 2019
6a35c38
doc: fix typographical error
Trott Nov 30, 2019
3b096c2
build,win: propagate error codes in vcbuild
joaocgreis Nov 30, 2019
197b616
test: add an indicator `isIBMi`
dmabupt Nov 29, 2019
f3c3b1d
test: add coverage for ERR_TLS_INVALID_PROTOCOL_VERSION
Trott Nov 30, 2019
a83ccf8
test: skip test-domain-error-types in debug mode temporariliy
Trott Nov 24, 2019
0054636
doc: allow <code> in header elements
Trott Dec 23, 2019
424266a
doc,dns: use code markup/markdown in headers
Trott Dec 23, 2019
ef4ecf4
doc: use code markup/markdown in headers in addons documentation
Trott Dec 23, 2019
a933028
doc,assert: use code markup/markdown in headers
Trott Dec 23, 2019
a2bea80
doc,async_hooks: use code markup/markdown in headers
Trott Dec 23, 2019
b4934ef
doc,buffer: use code markup/markdown in headers
Trott Dec 23, 2019
3e07682
doc,child_process: use code markup/markdown in headers
Trott Dec 23, 2019
700e28d
doc,cluster: use code markup/markdown in headers
Trott Dec 24, 2019
d92200a
doc,console: use code markup/markdown in headers
Trott Dec 24, 2019
af66dba
doc,crypto: use code markup/markdown in headers
Trott Dec 24, 2019
e00e4d2
doc: use code markup/markdown in headers in deprecations documentation
Trott Dec 24, 2019
17efccd
doc,dgram: use code markup/markdown in headers
Trott Dec 24, 2019
4eb5e60
doc,domain: use code markup/markdown in headers
Trott Dec 24, 2019
e74fa1e
doc,errors: use code markup/markdown in headers
Trott Dec 24, 2019
c763c70
doc,esm: use code markup/markdown in headers
Trott Dec 24, 2019
b1f2dd6
doc,events: use code markup/markdown in headers
Trott Dec 24, 2019
e91846c
doc,fs: use code markup/markdown in headers
Trott Dec 24, 2019
23f5045
doc: use code markup/markdown in headers in globals documentation
Trott Dec 24, 2019
3e95c86
doc,http: use code markup/markdown in headers
Trott Dec 24, 2019
f6084bc
doc,http2: use code markup/markdown in headers
Trott Dec 24, 2019
eb82113
doc,https: use code markup/markdown in headers
Trott Dec 24, 2019
3ac8493
doc,inspector: use code markup/markdown in headers
Trott Dec 24, 2019
e2a4293
doc,module: use code markup/markdown in headers
Trott Dec 24, 2019
7cce4bb
doc,net: use code markup/markdown in headers
Trott Dec 24, 2019
cc65a3c
doc,os: use code markup/markdown in headers
Trott Dec 24, 2019
7b73674
doc,path: use code markup/markdown in headers
Trott Dec 24, 2019
6885967
doc,perf_hooks: use code markup/markdown in headers
Trott Dec 24, 2019
a8f3310
doc,process: use code markup/markdown in headers
Trott Dec 24, 2019
0c253b9
doc,punycode: use code markup/markdown in headers
Trott Dec 24, 2019
003e188
doc,querystring: use code markup/markdown in headers
Trott Dec 24, 2019
b4b4da4
doc,readline: use code markup/markdown in headers
Trott Dec 24, 2019
728c984
doc,repl: use code markup/markdown in headers
Trott Dec 24, 2019
3a1772c
doc,stream: use code markup/markdown in headers
Trott Dec 24, 2019
13e067b
doc,string_decoder: use code markup/markdown in headers
Trott Dec 24, 2019
e3f26c4
doc,timers: use code markup/markdown in headers
Trott Dec 24, 2019
5a76e25
doc,tls: use code markup/markdown in headers
Trott Dec 24, 2019
3c2c8fa
doc,tty: use code markup/markdown in headers
Trott Dec 24, 2019
a0717c7
doc,url: use code markup/markdown in headers
Trott Dec 24, 2019
1bf0dd7
doc,zlib: use code markup/markdown in headers
Trott Dec 24, 2019
f7a70bb
doc,util: use code markup/markdown in headers
Trott Dec 24, 2019
de8f03a
doc,v8: use code markup/markdown in headers
Trott Dec 24, 2019
58132d5
doc,worker: use code markup/markdown in headers
Trott Dec 24, 2019
113cbef
doc,vm: use code markup/markdown in headers
Trott Dec 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc,async_hooks: use code markup/markdown in headers
PR-URL: #31086
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott committed Dec 27, 2019
commit a2bea8080f251ebce36fa9f3b9dd819f52a79d4a
32 changes: 16 additions & 16 deletions doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function destroy(asyncId) { }
function promiseResolve(asyncId) { }
```

#### async_hooks.createHook(callbacks)
#### `async_hooks.createHook(callbacks)`

<!-- YAML
added: v8.1.0
Expand Down Expand Up @@ -171,7 +171,7 @@ provided by AsyncHooks itself. The logging should then be skipped when
it was the logging itself that caused AsyncHooks callback to call. By
doing this the otherwise infinite recursion is broken.

#### asyncHook.enable()
#### `asyncHook.enable()`

* Returns: {AsyncHook} A reference to `asyncHook`.

Expand All @@ -187,7 +187,7 @@ const async_hooks = require('async_hooks');
const hook = async_hooks.createHook(callbacks).enable();
```

#### asyncHook.disable()
#### `asyncHook.disable()`

* Returns: {AsyncHook} A reference to `asyncHook`.

Expand All @@ -203,7 +203,7 @@ Key events in the lifetime of asynchronous events have been categorized into
four areas: instantiation, before/after the callback is called, and when the
instance is destroyed.

##### init(asyncId, type, triggerAsyncId, resource)
##### `init(asyncId, type, triggerAsyncId, resource)`

* `asyncId` {number} A unique ID for the async resource.
* `type` {string} The type of the async resource.
Expand Down Expand Up @@ -390,7 +390,7 @@ API the user's callback is placed in a `process.nextTick()`.
The graph only shows *when* a resource was created, not *why*, so to track
the *why* use `triggerAsyncId`.

##### before(asyncId)
##### `before(asyncId)`

* `asyncId` {number}

Expand All @@ -407,7 +407,7 @@ asynchronous resources like a TCP server will typically call the `before`
callback multiple times, while other operations like `fs.open()` will call
it only once.

##### after(asyncId)
##### `after(asyncId)`

* `asyncId` {number}

Expand All @@ -417,7 +417,7 @@ If an uncaught exception occurs during execution of the callback, then `after`
will run *after* the `'uncaughtException'` event is emitted or a `domain`'s
handler runs.

##### destroy(asyncId)
##### `destroy(asyncId)`

* `asyncId` {number}

Expand All @@ -429,7 +429,7 @@ made to the `resource` object passed to `init` it is possible that `destroy`
will never be called, causing a memory leak in the application. If the resource
does not depend on garbage collection, then this will not be an issue.

##### promiseResolve(asyncId)
##### `promiseResolve(asyncId)`

<!-- YAML
added: v8.6.0
Expand Down Expand Up @@ -460,7 +460,7 @@ init for PROMISE with id 6, trigger id: 5 # the Promise returned by then()
after 6
```

#### async_hooks.executionAsyncId()
#### `async_hooks.executionAsyncId()`

<!-- YAML
added: v8.1.0
Expand Down Expand Up @@ -501,7 +501,7 @@ const server = net.createServer((conn) => {
Promise contexts may not get precise `executionAsyncIds` by default.
See the section on [promise execution tracking][].

#### async_hooks.triggerAsyncId()
#### `async_hooks.triggerAsyncId()`

* Returns: {number} The ID of the resource responsible for calling the callback
that is currently being executed.
Expand Down Expand Up @@ -577,7 +577,7 @@ Library developers that handle their own asynchronous resources performing tasks
like I/O, connection pooling, or managing callback queues may use the
`AsyncWrap` JavaScript API so that all the appropriate callbacks are called.

### Class: AsyncResource
### Class: `AsyncResource`

The class `AsyncResource` is designed to be extended by the embedder's async
resources. Using this, users can easily trigger the lifetime events of their
Expand Down Expand Up @@ -615,7 +615,7 @@ asyncResource.asyncId();
asyncResource.triggerAsyncId();
```

#### new AsyncResource(type\[, options\])
#### `new AsyncResource(type[, options])`

* `type` {string} The type of async event.
* `options` {Object}
Expand Down Expand Up @@ -649,7 +649,7 @@ class DBQuery extends AsyncResource {
}
```

#### asyncResource.runInAsyncScope(fn\[, thisArg, ...args\])
#### `asyncResource.runInAsyncScope(fn[, thisArg, ...args])`
<!-- YAML
added: v9.6.0
-->
Expand All @@ -664,7 +664,7 @@ of the async resource. This will establish the context, trigger the AsyncHooks
before callbacks, call the function, trigger the AsyncHooks after callbacks, and
then restore the original execution context.

#### asyncResource.emitDestroy()
#### `asyncResource.emitDestroy()`

* Returns: {AsyncResource} A reference to `asyncResource`.

Expand All @@ -673,11 +673,11 @@ be thrown if it is called more than once. This **must** be manually called. If
the resource is left to be collected by the GC then the `destroy` hooks will
never be called.

#### asyncResource.asyncId()
#### `asyncResource.asyncId()`

* Returns: {number} The unique `asyncId` assigned to the resource.

#### asyncResource.triggerAsyncId()
#### `asyncResource.triggerAsyncId()`

* Returns: {number} The same `triggerAsyncId` that is passed to the
`AsyncResource` constructor.
Expand Down