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 12fbac1

Browse filesBrowse files
cjihrigevanlucas
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 6dc0dae commit 12fbac1
Copy full SHA for 12fbac1

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:
@@ -735,3 +735,4 @@ socket.on('data', (id) => {
735735
[Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options
736736
[child_process event: 'exit']: child_process.html#child_process_event_exit
737737
[child_process event: 'message']: child_process.html#child_process_event_message
738+
[`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.