mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
tools: add Worker to type-parser
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/38659 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
This commit is contained in:
committed by
Michaël Zasso
parent
c182198c44
commit
ec8ab22ce6
@@ -4,10 +4,11 @@ const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const {
|
||||
Worker,
|
||||
threadId: parentThreadId,
|
||||
} = require('worker_threads');
|
||||
|
||||
process.on('worker', common.mustCall(({ threadId }) => {
|
||||
assert.strictEqual(threadId, 1);
|
||||
assert.strictEqual(threadId, parentThreadId + 1);
|
||||
}));
|
||||
|
||||
new Worker('', { eval: true });
|
||||
|
||||
@@ -223,6 +223,7 @@ const customTypesMap = {
|
||||
'vm.SourceTextModule': 'vm.html#vm_class_vm_sourcetextmodule',
|
||||
|
||||
'MessagePort': 'worker_threads.html#worker_threads_class_messageport',
|
||||
'Worker': 'worker_threads.html#worker_threads_class_worker',
|
||||
|
||||
'X509Certificate': 'crypto.html#crypto_class_x509certificate',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user