Skip to main content
Worker.prototype.id - cluster - Node documentation
property Worker.prototype.id

Usage in Deno

import { Worker } from "node:cluster";

Each new worker is given its own unique id, this id is stored in the id.

While a worker is alive, this is the key that indexes it in cluster.workers.

Type

number
Back to top