Skip to content

Commit

Permalink
doc: remove "note that" from cluster.md
Browse files Browse the repository at this point in the history
Refs: nodejs/remark-preset-lint-node#16

PR-URL: #28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Trott authored and targos committed Jul 2, 2019
1 parent af05ad1 commit cb89b3b
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ Worker 6056 started
Worker 5644 started
```

Please note that on Windows, it is not yet possible to set up a named pipe
server in a worker.
On Windows, it is not yet possible to set up a named pipe server in a worker.

## How It Works

Expand Down Expand Up @@ -277,7 +276,7 @@ In the master, an internal message is sent to the worker causing it to call

Causes `.exitedAfterDisconnect` to be set.

Note that after a server is closed, it will no longer accept new connections,
After a server is closed, it will no longer accept new connections,
but connections may be accepted by any other listening worker. Existing
connections will be allowed to close as usual. When no more connections exist,
see [`server.close()`][], the IPC channel to the worker will close allowing it
Expand All @@ -287,8 +286,8 @@ The above applies *only* to server connections, client connections are not
automatically closed by workers, and disconnect does not wait for them to close
before exiting.

Note that in a worker, `process.disconnect` exists, but it is not this function,
it is [`disconnect`][].
In a worker, `process.disconnect` exists, but it is not this function;
it is [`disconnect()`][].

Because long living server connections may block workers from disconnecting, it
may be useful to send a message, so application specific actions may be taken to
Expand Down Expand Up @@ -403,8 +402,8 @@ Causes `.exitedAfterDisconnect` to be set.

This method is aliased as `worker.destroy()` for backwards compatibility.

Note that in a worker, `process.kill()` exists, but it is not this function,
it is [`kill`][].
In a worker, `process.kill()` exists, but it is not this function;
it is [`kill()`][].

### worker.process
<!-- YAML
Expand All @@ -419,7 +418,7 @@ is stored.

See: [Child Process module][].

Note that workers will call `process.exit(0)` if the `'disconnect'` event occurs
Workers will call `process.exit(0)` if the `'disconnect'` event occurs
on `process` and `.exitedAfterDisconnect` is not `true`. This protects against
accidental disconnection.

Expand Down Expand Up @@ -758,14 +757,14 @@ changes:
`setupMaster` is used to change the default 'fork' behavior. Once called,
the settings will be present in `cluster.settings`.

Note that:
Any settings changes only affect future calls to `.fork()` and have no
effect on workers that are already running.

* Any settings changes only affect future calls to `.fork()` and have no
effect on workers that are already running.
* The *only* attribute of a worker that cannot be set via `.setupMaster()` is
the `env` passed to `.fork()`.
* The defaults above apply to the first call only, the defaults for later
calls is the current value at the time of `cluster.setupMaster()` is called.
The only attribute of a worker that cannot be set via `.setupMaster()` is
the `env` passed to `.fork()`.

The defaults above apply to the first call only; the defaults for later
calls are the current values at the time of `cluster.setupMaster()` is called.

```js
const cluster = require('cluster');
Expand Down Expand Up @@ -846,8 +845,8 @@ socket.on('data', (id) => {
[`child_process` event: `'exit'`]: child_process.html#child_process_event_exit
[`child_process` event: `'message'`]: child_process.html#child_process_event_message
[`cluster.settings`]: #cluster_cluster_settings
[`disconnect`]: child_process.html#child_process_subprocess_disconnect
[`kill`]: process.html#process_process_kill_pid_signal
[`disconnect()`]: child_process.html#child_process_subprocess_disconnect
[`kill()`]: process.html#process_process_kill_pid_signal
[`process` event: `'message'`]: process.html#process_event_message
[`server.close()`]: net.html#net_event_close
[`worker.exitedAfterDisconnect`]: #cluster_worker_exitedafterdisconnect
Expand Down

0 comments on commit cb89b3b

Please sign in to comment.