Skip to content

Commit c56ddc7

Browse files
addaleaxtargos
authored andcommitted
doc: document uniqueness of worker.threadId
PR-URL: #25644 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
1 parent af6e439 commit c56ddc7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/worker_threads.md

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ added: v10.5.0
8181

8282
An integer identifier for the current thread. On the corresponding worker object
8383
(if there is any), it is available as [`worker.threadId`][].
84+
This value is unique for each [`Worker`][] instance inside a single process.
8485

8586
## worker.workerData
8687
<!-- YAML
@@ -453,6 +454,7 @@ added: v10.5.0
453454

454455
An integer identifier for the referenced thread. Inside the worker thread,
455456
it is available as [`require('worker_threads').threadId`][].
457+
This value is unique for each `Worker` instance inside a single process.
456458

457459
### worker.unref()
458460
<!-- YAML

0 commit comments

Comments
 (0)