DEP0007:将 cluster 中的 worker.suicide 替换为 worker.exitedAfterDisconnect
【DEP0007: Replace cluster worker.suicide with worker.exitedAfterDisconnect】
类型:寿命终止
【Type: End-of-Life】
在早期版本的 Node.js cluster 中,Worker 对象上添加了一个名为 suicide 的布尔属性。这个属性的目的是提供关于 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.】