Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc/api
diff options
context:
space:
mode:
authorGerhard Stoebich <18708370+Flarna@users.noreply.github.com>2020-03-03 10:52:27 +0300
committerMatheus Marchini <mmarchini@netflix.com>2020-03-10 20:21:52 +0300
commit28fae8bff1949c5008b518fa24fbc5ff5c468267 (patch)
tree6868c5bf644e487515b0d76635668aebd3731b2b /doc/api
parent173d044d0976e30bc2ab0a40807ec617b0b8a55a (diff)
doc: change worker.takeHeapSnapshot to getHeapSnapshot
Adapt doc to match implementation which exports getHeapSnapshot(). PR-URL: https://github.com/nodejs/node/pull/32061 Refs: https://github.com/nodejs/node/pull/31569 Refs: https://github.com/nodejs/node/blob/987a67339518d0380177a2e589f2bbd274230d0e/lib/internal/worker.js#L323 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/worker_threads.md30
1 files changed, 15 insertions, 15 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index e773949b49d..406728995c9 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -612,6 +612,21 @@ added: v10.5.0
The `'online'` event is emitted when the worker thread has started executing
JavaScript code.
+### `worker.getHeapSnapshot()`
+<!-- YAML
+added: v13.9.0
+-->
+
+* Returns: {Promise} A promise for a Readable Stream containing
+ a V8 heap snapshot
+
+Returns a readable stream for a V8 snapshot of the current state of the Worker.
+See [`v8.getHeapSnapshot()`][] for more details.
+
+If the Worker thread is no longer running, which may occur before the
+[`'exit'` event][] is emitted, the returned `Promise` will be rejected
+immediately with an [`ERR_WORKER_NOT_RUNNING`][] error.
+
### `worker.postMessage(value[, transferList])`
<!-- YAML
added: v10.5.0
@@ -685,21 +700,6 @@ inside the worker thread. If `stdout: true` was not passed to the
[`Worker`][] constructor, then data will be piped to the parent thread's
[`process.stdout`][] stream.
-### `worker.takeHeapSnapshot()`
-<!-- YAML
-added: v13.9.0
--->
-
-* Returns: {Promise} A promise for a Readable Stream containing
- a V8 heap snapshot
-
-Returns a readable stream for a V8 snapshot of the current state of the Worker.
-See [`v8.getHeapSnapshot()`][] for more details.
-
-If the Worker thread is no longer running, which may occur before the
-[`'exit'` event][] is emitted, the returned `Promise` will be rejected
-immediately with an [`ERR_WORKER_NOT_RUNNING`][] error.
-
### `worker.terminate()`
<!-- YAML
added: v10.5.0