Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 75e4f74

Browse filesBrowse files
cjihrigMyles Borins
authored andcommitted
doc: fix cluster worker 'message' event
This commit adds the missing handle argument to the cluster worker 'message' event. It also adds a link to the process 'message' event for reference. Refs: #7297 PR-URL: #7309 Reviewed-By: Brian White <mscdex@mscdex.net>
1 parent e3097b7 commit 75e4f74
Copy full SHA for 75e4f74

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/cluster.md‎

Copy file name to clipboardExpand all lines: doc/api/cluster.md
+5-4Lines changed: 5 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ It is not emitted in the worker.
167167
### Event: 'message'
168168

169169
* `message` {Object}
170+
* `handle` {undefined|Object}
170171

171-
Similar to the `cluster.on('message')` event, but specific to this worker.
172-
173-
This event is the same as the one provided by [`child_process.fork()`][].
172+
Similar to the `cluster.on('message')` event, but specific to this worker. In a
173+
worker you can also use `process.on('message')`.
174174

175-
In a worker you can also use `process.on('message')`.
175+
See [`process` event: `'message'`][].
176176

177177
As an example, here is a cluster that keeps count of the number of requests
178178
in the master process using the message system:
@@ -689,3 +689,4 @@ socket.on('data', (id) => {
689689
[Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options
690690
[child_process event: 'exit']: child_process.html#child_process_event_exit
691691
[child_process event: 'message']: child_process.html#child_process_event_message
692+
[`process` event: `'message'`]: process.html#process_event_message

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.