类:Worker
¥Class: Worker
-
¥Extends: <EventEmitter>
Worker
对象包含了工作进程的所有公共的信息和方法。在主进程中,可以使用 cluster.workers
来获取它。在工作进程中,可以使用 cluster.worker
来获取它。
¥A Worker
object contains all public information and method about a worker.
In the primary it can be obtained using cluster.workers
. In a worker
it can be obtained using cluster.worker
.