Skip to content

Commit

Permalink
doc: clarify when messageerror is emitted
Browse files Browse the repository at this point in the history
Adapting addaleax's explanation from the issue.

Fixes: nodejs#36333
Signed-off-by: James M Snell <jasnell@gmail.com>
  • Loading branch information
jasnell committed Jan 4, 2021
1 parent 8b8620d commit c09df40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ added:

The `'messageerror'` event is emitted when deserializing a message failed.

Currently, this event is emitted when there is an error occuring while
instantiating the posted JS object on the receiving end. Such situations
are rare, but can happen, for instance, when certain Node.js API objects
are received in a `vm.Context` (where Node.js APIs are currently
unavailable).

### `port.close()`
<!-- YAML
added: v10.5.0
Expand Down

0 comments on commit c09df40

Please sign in to comment.