Skip to content

Commit 87e4bfd

Browse files
sam-githubbrendanashworth
authored andcommitted
doc: link cluster worker.send() to child.send()
PR-URL: #839 Reviewed-By: Brendan Ashworth <[email protected]>
1 parent 872702d commit 87e4bfd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/api/cluster.markdown

+6-4
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,13 @@ exit, the master may choose not to respawn a worker based on this value.
420420
* `message` {Object}
421421
* `sendHandle` {Handle object}
422422

423-
This function is equal to the send methods provided by
424-
`child_process.fork()`. In the master you should use this function to
425-
send a message to a specific worker.
423+
Send a message to a worker or master, optionally with a handle.
426424

427-
In a worker you can also use `process.send(message)`, it is the same function.
425+
In the master this sends a message to a specific worker. It is identical to
426+
[child.send()](child_process.html#child_process_child_send_message_sendhandle).
427+
428+
In a worker this sends a message to the master. It is identical to
429+
`process.send()`.
428430

429431
This example will echo back all messages from the master:
430432

0 commit comments

Comments
 (0)