-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Conversation
4e3951d
to
a419c5a
Compare
Should help with #774 (comment) |
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. | ||
In the master you should use this function to send a message to a specific |
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.
i'd say "should use" -> something along the lines of "can be used"
a419c5a
to
c5a3859
Compare
@brendanashworth PTAL, I incorporated your suggestions. |
@brendanashworth, please take a look |
@sam-github sorry - I just feel a little bit iffy on OK-ing this immediately because I'd like for these docs to also mention whether it is sync or async, but that would depend on #774. |
[child.send()](child_process.html#child_process_child_send_message_sendhandle). | ||
|
||
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 comment
The reason will be displayed to describe this comment to others. Learn more.
is there anything that we can link process.send()
to?
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.
No. But that's a seperate problem.
I don't think the docs should mention if its sync or async, they should say its identical to child.send(), link to child.send(), and leave it at that. Repeating implementation details of node APIs throughout node leads to inevitable inaccuracies. |
|
||
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 comment
The reason will be displayed to describe this comment to others. Learn more.
can we link to a code'ified (with brackets)
child.send()` rather than plaintext?
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.
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: git grep '().*\].*html#' doc/api
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.
okay
LGTM, I'll merge in a second. |
PR-URL: #839 Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Sorry for taking so long on this one. Merged per |
/to @brendanashworth Is this clearer?