An integer identifier for the referenced thread. Inside the worker thread, it is available as require('node:worker_threads').threadId. This value is unique for each Worker instance inside a single process.
require('node:worker_threads').threadId
Worker
v10.5.0