Skip to main content
Worker.prototype.threadId - worker_threads - Node documentation
property Worker.prototype.threadId

Usage in Deno

import { Worker } from "node:worker_threads";

An integer identifier for the referenced thread. Inside the worker thread, it is available as import { threadId } from 'node:worker_threads'. This value is unique for each Worker instance inside a single process.

Type

number