mirror of
https://github.com/nodejs/node.git
synced 2024-11-22 07:37:56 +01:00
da7962fd4d
PR-URL: https://github.com/nodejs/node/pull/49742 Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
36 lines
955 B
TypeScript
36 lines
955 B
TypeScript
import { InternalMessagingBinding } from './messaging';
|
|
|
|
declare namespace InternalWorkerBinding {
|
|
class Worker {
|
|
constructor(
|
|
url: string | URL | null,
|
|
env: object | null | undefined,
|
|
execArgv: string[] | null | undefined,
|
|
resourceLimits: Float64Array,
|
|
trackUnmanagedFds: boolean,
|
|
);
|
|
startThread(): void;
|
|
stopThread(): void;
|
|
ref(): void;
|
|
unref(): void;
|
|
getResourceLimits(): Float64Array;
|
|
takeHeapSnapshot(): object;
|
|
loopIdleTime(): number;
|
|
loopStartTime(): number;
|
|
}
|
|
}
|
|
|
|
export interface WorkerBinding {
|
|
Worker: typeof InternalWorkerBinding.Worker;
|
|
getEnvMessagePort(): InternalMessagingBinding.MessagePort;
|
|
threadId: number;
|
|
isMainThread: boolean;
|
|
ownsProcessState: boolean;
|
|
resourceLimits?: Float64Array;
|
|
kMaxYoungGenerationSizeMb: number;
|
|
kMaxOldGenerationSizeMb: number;
|
|
kCodeRangeSizeMb: number;
|
|
kStackSizeMb: number;
|
|
kTotalResourceLimitCount: number;
|
|
}
|