0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/lib/worker_threads.js

51 lines
882 B
JavaScript
Raw Permalink Normal View History

'use strict';
const {
isMainThread,
SHARE_ENV,
resourceLimits,
setEnvironmentData,
getEnvironmentData,
threadId,
Worker,
} = require('internal/worker');
const {
MessagePort,
MessageChannel,
markAsUncloneable,
moveMessagePortToContext,
receiveMessageOnPort,
BroadcastChannel,
} = require('internal/worker/io');
const {
postMessageToThread,
} = require('internal/worker/messaging');
const {
markAsUntransferable,
isMarkedAsUntransferable,
} = require('internal/buffer');
module.exports = {
isMainThread,
MessagePort,
MessageChannel,
markAsUncloneable,
markAsUntransferable,
isMarkedAsUntransferable,
moveMessagePortToContext,
receiveMessageOnPort,
resourceLimits,
postMessageToThread,
threadId,
SHARE_ENV,
Worker,
parentPort: null,
workerData: null,
BroadcastChannel,
setEnvironmentData,
getEnvironmentData,
};