diff --git a/doc/api/worker.md b/doc/api/worker.md index 6a391c5a9e3b19..974ff2e46710db 100644 --- a/doc/api/worker.md +++ b/doc/api/worker.md @@ -85,14 +85,16 @@ to stringify. `transferList` may be a list of `ArrayBuffer` and `MessagePort` objects. After transferring, they will not be usable on the sending side of the channel -anymore (even if they are not contained in `value`). +anymore (even if they are not contained in `value`). Unlike with +[child processes][], transferring handles such as network sockets is currently +not supported. + +If `value` contains [`SharedArrayBuffer`][] instances, those will be accessible +from either thread. They cannot be listed in `transferList`. `value` may still contain `ArrayBuffer` instances that are not in `transferList`; in that case, the underlying memory is copied rather than moved. -For more information on the serialization and deserialization mechanisms -behind this API, see the [serialization API of the `v8` module][v8.serdes]. - Because the object cloning uses the structured clone algorithm, non-enumerable properties, property accessors, and object prototypes are not preserved. In particular, [`Buffer`][] objects will be read as @@ -101,6 +103,9 @@ plain [`Uint8Array`][]s on the receiving side. The message object will be cloned immediately, and can be modified after posting without having side effects. +For more information on the serialization and deserialization mechanisms +behind this API, see the [serialization API of the `v8` module][v8.serdes]. + ### port.ref()