Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

sam-github
Copy link
Contributor

/to @brendanashworth Is this clearer?

@sam-github sam-github force-pushed the link-cluster-send-docs branch from 4e3951d to a419c5a Compare February 13, 2015 21:54
@sam-github
Copy link
Contributor Author

Should help with #774 (comment)

@sam-github sam-github added doc Issues and PRs related to the documentations. cluster Issues and PRs related to the cluster subsystem. labels Feb 13, 2015
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
Copy link
Contributor

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"

@sam-github sam-github force-pushed the link-cluster-send-docs branch from a419c5a to c5a3859 Compare February 15, 2015 05:03
@sam-github
Copy link
Contributor Author

@brendanashworth PTAL, I incorporated your suggestions.

@sam-github
Copy link
Contributor Author

@brendanashworth, please take a look

@brendanashworth
Copy link
Contributor

@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()`.
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@sam-github
Copy link
Contributor Author

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).
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

@brendanashworth
Copy link
Contributor

LGTM, I'll merge in a second.

sam-github added a commit that referenced this pull request Feb 25, 2015
PR-URL: #839
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
@brendanashworth
Copy link
Contributor

Sorry for taking so long on this one. Merged per 87e4bfd, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster Issues and PRs related to the cluster subsystem. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants