File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -612,6 +612,21 @@ added: v10.5.0
612612The ` 'online' ` event is emitted when the worker thread has started executing
613613JavaScript code.
614614
615+ ### ` worker.getHeapSnapshot() `
616+ <!-- YAML
617+ added: v13.9.0
618+ -->
619+
620+ * Returns: {Promise} A promise for a Readable Stream containing
621+ a V8 heap snapshot
622+
623+ Returns a readable stream for a V8 snapshot of the current state of the Worker.
624+ See [ ` v8.getHeapSnapshot() ` ] [ ] for more details.
625+
626+ If the Worker thread is no longer running, which may occur before the
627+ [ ` 'exit' ` event] [ ] is emitted, the returned ` Promise ` will be rejected
628+ immediately with an [ ` ERR_WORKER_NOT_RUNNING ` ] [ ] error.
629+
615630### ` worker.postMessage(value[, transferList]) `
616631<!-- YAML
617632added: v10.5.0
@@ -685,21 +700,6 @@ inside the worker thread. If `stdout: true` was not passed to the
685700[ ` Worker ` ] [ ] constructor, then data will be piped to the parent thread's
686701[ ` process.stdout ` ] [ ] stream.
687702
688- ### ` worker.takeHeapSnapshot() `
689- <!-- YAML
690- added: v13.9.0
691- -->
692-
693- * Returns: {Promise} A promise for a Readable Stream containing
694- a V8 heap snapshot
695-
696- Returns a readable stream for a V8 snapshot of the current state of the Worker.
697- See [ ` v8.getHeapSnapshot() ` ] [ ] for more details.
698-
699- If the Worker thread is no longer running, which may occur before the
700- [ ` 'exit' ` event] [ ] is emitted, the returned ` Promise ` will be rejected
701- immediately with an [ ` ERR_WORKER_NOT_RUNNING ` ] [ ] error.
702-
703703### ` worker.terminate() `
704704<!-- YAML
705705added: v10.5.0
You can’t perform that action at this time.
0 commit comments