@@ -721,6 +721,17 @@ An integer identifier for the current thread. On the corresponding worker object
721721(if there is any), it is available as [`worker.threadId`][].
722722This value is unique for each [`Worker`][] instance inside a single process.
723723
724+ ## `worker.threadName`
725+
726+ <!-- YAML
727+ added: REPLACEME
728+ -->
729+
730+ * {string}
731+
732+ A string identifier for the current thread. On the corresponding worker object
733+ (if there is any), it is available as [`worker.threadName`][].
734+
724735## `worker.workerData`
725736
726737<!-- YAML
@@ -1855,6 +1866,17 @@ An integer identifier for the referenced thread. Inside the worker thread,
18551866it is available as [` require('node:worker_threads').threadId` ][].
18561867This value is unique for each ` Worker` instance inside a single process .
18571868
1869+ ### ` worker.threadName`
1870+
1871+ <!-- YAML
1872+ added: REPLACEME
1873+ -->
1874+
1875+ * {string}
1876+
1877+ A string identifier for the referenced thread . Inside the worker thread,
1878+ it is available as [` require('node:worker_threads').threadName` ][].
1879+
18581880### ` worker.unref()`
18591881
18601882<!-- YAML
@@ -1981,6 +2003,7 @@ thread spawned will spawn another until the application crashes.
19812003[` require('node:worker_threads').parentPort.postMessage()` ]: #workerpostmessagevalue- transferlist
19822004[` require('node:worker_threads').parentPort` ]: #workerparentport
19832005[` require('node:worker_threads').threadId` ]: #workerthreadid
2006+ [` require('node:worker_threads').threadName` ]: #workerthreadname
19842007[` require('node:worker_threads').workerData` ]: #workerworkerdata
19852008[` trace_events` ]: tracing .md
19862009[` v8.getHeapSnapshot()` ]: v8 .md #v8getheapsnapshotoptions
@@ -1991,6 +2014,7 @@ thread spawned will spawn another until the application crashes.
19912014[` worker.postMessage()` ]: #workerpostmessagevalue- transferlist
19922015[` worker.terminate()` ]: #workerterminate
19932016[` worker.threadId` ]: #workerthreadid_1
2017+ [` worker.threadName` ]: #workerthreadname_1
19942018[async - resource- worker- pool]: async_context .md #using- asyncresource- for - a- worker- thread- pool
19952019[browser ` MessagePort` ]: https: // developer.mozilla.org/en-US/docs/Web/API/MessagePort
19962020[child processes]: child_process .md
0 commit comments