Skip to content

Commit 75e4f74

Browse files
cjihrigMyles Borins
authored and
Myles Borins
committedJul 14, 2016
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 <[email protected]>
1 parent e3097b7 commit 75e4f74

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

‎doc/api/cluster.md

+5-4
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)
Please sign in to comment.