mirror of
https://github.com/nodejs/node.git
synced 2025-05-02 03:31:35 +00:00

PR-URL: https://github.com/nodejs/node/pull/46687 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Darshan Sen <raisinten@gmail.com>
22 lines
426 B
JavaScript
22 lines
426 B
JavaScript
'use strict';
|
|
|
|
// This file contains process bootstrappers that can only be
|
|
// run in the worker thread.
|
|
|
|
const {
|
|
codes: { ERR_WORKER_UNSUPPORTED_OPERATION },
|
|
} = require('internal/errors');
|
|
|
|
function unavailable(name) {
|
|
function unavailableInWorker() {
|
|
throw new ERR_WORKER_UNSUPPORTED_OPERATION(name);
|
|
}
|
|
|
|
unavailableInWorker.disabled = true;
|
|
return unavailableInWorker;
|
|
}
|
|
|
|
module.exports = {
|
|
unavailable,
|
|
};
|