| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6dc0dae commit 12fbac1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -167,12 +167,12 @@ It is not emitted in the worker. | |||
| 167 | 167 | ### Event: 'message' | |
| 168 | 168 | ||
| 169 | 169 | * `message` {Object} | |
| 170 | + * `handle` {undefined|Object} | ||
| 170 | 171 | ||
| 171 | - Similar to the `cluster.on('message')` event, but specific to this worker. | ||
| 172 | - | ||
| 173 | - This event is the same as the one provided by [`child_process.fork()`][]. | ||
| 172 | + Similar to the `cluster.on('message')` event, but specific to this worker. In a | ||
| 173 | + worker you can also use `process.on('message')`. | ||
| 174 | 174 | ||
| 175 | - In a worker you can also use `process.on('message')`. | ||
| 175 | + See [`process` event: `'message'`][]. | ||
| 176 | 176 | ||
| 177 | 177 | As an example, here is a cluster that keeps count of the number of requests | |
| 178 | 178 | in the master process using the message system: | |
@@ -735,3 +735,4 @@ socket.on('data', (id) => { | |||
| 735 | 735 | [Child Process module]: child_process.html#child_process_child_process_fork_modulepath_args_options | |
| 736 | 736 | [child_process event: 'exit']: child_process.html#child_process_event_exit | |
| 737 | 737 | [child_process event: 'message']: child_process.html#child_process_event_message | |
| 738 | + [`process` event: `'message'`]: process.html#process_event_message | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments