summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan José Arboleda <soyjuanarbol@gmail.com>2020-04-16 09:56:20 -0500
committerBeth Griggs <Bethany.Griggs@uk.ibm.com>2020-04-28 23:00:40 +0100
commita534d8282c986e2ba01d412228c9e24efe1814c6 (patch)
tree55c98ca7e39db3c0fd0d58b994cc9f5b7f544791
parent184e80a1446518b6f120978f20464c3c1e28c7a5 (diff)
downloadnode-new-a534d8282c986e2ba01d412228c9e24efe1814c6.tar.gz
doc: add documentation for transferList arg at worker threads
Ref: https://github.com/nodejs/node/pull/32278 PR-URL: https://github.com/nodejs/node/pull/32881 Refs: https://github.com/nodejs/node/pull/32278 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-rw-r--r--doc/api/worker_threads.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md
index d3b15155d5..dd324ba806 100644
--- a/doc/api/worker_threads.md
+++ b/doc/api/worker_threads.md
@@ -564,6 +564,10 @@ changes:
occur as described in the [HTML structured clone algorithm][], and an error
will be thrown if the object cannot be cloned (e.g. because it contains
`function`s).
+ * `transferList` {Object[]} If one or more `MessagePort`-like objects
+ are passed in `workerData`, a `transferList` is required for those
+ items or [`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`][] will be thrown.
+ See [`port.postMessage()`][] for more information.
* `resourceLimits` {Object} An optional set of resource limits for the new
JS engine instance. Reaching these limits will lead to termination of the
`Worker` instance. These limits only affect the JS engine, and no external
@@ -751,6 +755,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
[`'exit'` event]: #worker_threads_event_exit
[`AsyncResource`]: async_hooks.html#async_hooks_class_asyncresource
[`Buffer`]: buffer.html
+[`ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`]: errors.html#errors_err_missing_message_port_in_transfer_list
[`ERR_WORKER_NOT_RUNNING`]: errors.html#ERR_WORKER_NOT_RUNNING
[`EventEmitter`]: events.html
[`EventTarget`]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget