DEP0007:将 cluster worker.suicide 替换为 worker.exitedAfterDisconnect
¥DEP0007: Replace cluster
worker.suicide
with worker.exitedAfterDisconnect
类型:生命结束
¥Type: End-of-Life
在早期版本的 Node.js cluster
中,名称为 suicide
的布尔属性被添加到 Worker
对象。此属性的目的是提供有关 Worker
实例退出的方式和原因的指示。在 Node.js 6.0.0 中,旧属性已弃用并替换为新的 worker.exitedAfterDisconnect
属性。旧的属性名称并没有准确描述实际的语义,而且不必要地充满了情感。
¥In an earlier version of the Node.js cluster
, a boolean property with the name
suicide
was added to the Worker
object. The intent of this property was to
provide an indication of how and why the Worker
instance exited. In Node.js
6.0.0, the old property was deprecated and replaced with a new
worker.exitedAfterDisconnect
property. The old property name did not
precisely describe the actual semantics and was unnecessarily emotion-laden.