| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 99735a6 commit 587deac
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,10 +4,11 @@ const common = require('../common'); | |||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | const { | |
| 6 | 6 | Worker, | |
| 7 | + threadId: parentThreadId, | ||
| 7 | 8 | } = require('worker_threads'); | |
| 8 | 9 | ||
| 9 | 10 | process.on('worker', common.mustCall(({ threadId }) => { | |
| 10 | - assert.strictEqual(threadId, 1); | ||
| 11 | + assert.strictEqual(threadId, parentThreadId + 1); | ||
| 11 | 12 | })); | |
| 12 | 13 | ||
| 13 | 14 | new Worker('', { eval: true }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -175,6 +175,7 @@ const customTypesMap = { | |||
| 175 | 175 | 'vm.SourceTextModule': 'vm.html#vm_class_vm_sourcetextmodule', | |
| 176 | 176 | ||
| 177 | 177 | 'MessagePort': 'worker_threads.html#worker_threads_class_messageport', | |
| 178 | + 'Worker': 'worker_threads.html#worker_threads_class_worker', | ||
| 178 | 179 | ||
| 179 | 180 | 'zlib options': 'zlib.html#zlib_class_options', | |
| 180 | 181 | }; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments