node/lib/worker_threads.js

22 lines
281 B
JavaScript
Raw Normal View History

'use strict';
const {
isMainThread,
threadId,
Worker
} = require('internal/worker');
const {
MessagePort,
MessageChannel
} = require('internal/worker/io');
module.exports = {
isMainThread,
MessagePort,
MessageChannel,
threadId,
Worker,
parentPort: null
};