DEP0007: 使用 worker.exitedAfterDisconnect 替换集群的 worker.suicide


类型: 生命结束

在 Node.js cluster 的早期版本中,名为 suicide 的布尔属性被添加到 Worker 对象中。 此属性的目的是提供 Worker 实例退出的方式和原因的指示。 在 Node.js 6.0.0 中, 旧属性已被弃用,并被新的 worker.exitedAfterDisconnect 属性替换。 旧版的属性名称没有准确描述实际的语义,并且不必要地充满了情感。

Type: End-of-Life

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.