Skip to content

Commit

Permalink
cluster: make kill to be just process.kill
Browse files Browse the repository at this point in the history
Make `Worker.prototype.kill` to be just process.kill without preforming graceful disconnect beforehand.
Refs: nodejs#33715
  • Loading branch information
Bar Admoni committed Feb 4, 2022
1 parent b0c41ed commit 4fb861a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,12 @@ added: v0.9.12

This function will kill the worker. In the master, it does this by disconnecting
the `worker.process`, and once disconnected, killing with `signal`. In the
worker, it does it by killing the process with the given `signal`.
worker, it does it by killing the process with `signal`.

The `kill()` function kills the worker process without waiting for a graceful
disconnect, it have the same behavior of `worker.process.kill()`.

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

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

0 comments on commit 4fb861a

Please sign in to comment.