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: #36333
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: #36780
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
jasnell authored and targos committed May 1, 2021
1 parent e973bdc commit a800b5b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/worker_threads.md
Expand Up @@ -356,6 +356,12 @@ added: v14.5.0

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

Currently, this event is emitted when there is an error occurring 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 a800b5b

Please sign in to comment.