mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
Co-authored-by: 190n <7763597+190n@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
15 lines
311 B
JavaScript
15 lines
311 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const {
|
|
Worker,
|
|
threadId: parentThreadId,
|
|
} = require('worker_threads');
|
|
|
|
process.on('worker', common.mustCall(({ threadId }) => {
|
|
assert.strictEqual(threadId, parentThreadId + 1);
|
|
}));
|
|
|
|
new Worker('', { eval: true });
|