-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: link cluster worker.send() to child.send() #839
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -420,11 +420,13 @@ exit, the master may choose not to respawn a worker based on this value. | |
* `message` {Object} | ||
* `sendHandle` {Handle object} | ||
|
||
This function is equal to the send methods provided by | ||
`child_process.fork()`. In the master you should use this function to | ||
send a message to a specific worker. | ||
Send a message to a worker or master, optionally with a handle. | ||
|
||
In a worker you can also use `process.send(message)`, it is the same function. | ||
In the master this sends a message to a specific worker. It is identical to | ||
[child.send()](child_process.html#child_process_child_send_message_sendhandle). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we link to a code'ified (with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't know, but I grepped, and there are no such examples of such markup in existing node docs, this link is in the same form as all other links: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay |
||
|
||
In a worker this sends a message to the master. It is identical to | ||
`process.send()`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there anything that we can link There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No. But that's a seperate problem. |
||
|
||
This example will echo back all messages from the master: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing this kind of removes the general description of the function, I think it should have a general description too rather than only two separate ones