diff options
author | Sean Villars <stvillars8@gmail.com> | 2016-12-01 20:30:34 +0300 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2016-12-19 20:46:31 +0300 |
commit | 5d146021811c41def88208e60977eddbf0d6f125 (patch) | |
tree | e34dc76b3b2112e3ca14acfef0561602395f7da0 /doc/api | |
parent | 5e781a38834c4195d96c860e643dde850e8b7e6e (diff) |
cluster: return worker reference from disconnect()
Changes disconnect() to return a refererence to the worker.
This will enable method chaining such as
worker.disconnect().once('disconnect', doThis);
PR-URL: https://github.com/nodejs/node/pull/10019
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/cluster.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/api/cluster.md b/doc/api/cluster.md index c323282d0f9..f3c8017da1e 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -257,6 +257,8 @@ It is not emitted in the worker. added: v0.7.7 --> +* Returns: {Worker} A reference to `worker`. + In a worker, this function will close all servers, wait for the `'close'` event on those servers, and then disconnect the IPC channel. |