diff options
author | cjihrig <cjihrig@gmail.com> | 2016-06-15 10:08:53 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-06-17 14:55:08 -0400 |
commit | 62c8e7b922ea3e5bf7ac67a2b2b3b202d4b6b187 (patch) | |
tree | 8ce9c05db060c83c34e6570d2be563016800a0d1 /doc/api/cluster.md | |
parent | dfcf02b6f7762ef15726a6e9d843fabdbc7b0c3c (diff) | |
download | android-node-v8-62c8e7b922ea3e5bf7ac67a2b2b3b202d4b6b187.tar.gz android-node-v8-62c8e7b922ea3e5bf7ac67a2b2b3b202d4b6b187.tar.bz2 android-node-v8-62c8e7b922ea3e5bf7ac67a2b2b3b202d4b6b187.zip |
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: https://github.com/nodejs/node/pull/7297
PR-URL: https://github.com/nodejs/node/pull/7309
Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'doc/api/cluster.md')
-rw-r--r-- | doc/api/cluster.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 63cf2469b2..1c769567c4 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -167,12 +167,12 @@ It is not emitted in the worker. ### Event: 'message' * `message` {Object} +* `handle` {undefined|Object} -Similar to the `cluster.on('message')` event, but specific to this worker. - -This event is the same as the one provided by [`child_process.fork()`][]. +Similar to the `cluster.on('message')` event, but specific to this worker. In a +worker you can also use `process.on('message')`. -In a worker you can also use `process.on('message')`. +See [`process` event: `'message'`][]. As an example, here is a cluster that keeps count of the number of requests in the master process using the message system: @@ -735,3 +735,4 @@ socket.on('data', (id) => { [Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options [child_process event: 'exit']: child_process.html#child_process_event_exit [child_process event: 'message']: child_process.html#child_process_event_message +[`process` event: `'message'`]: process.html#process_event_message |