Module 基礎模塊

模塊worker_threads

worker 基礎模塊

引用方法:

1
var worker_threads = require('worker_threads');

對象

Worker

獨立線程工作對象,參見 Worker

1
Worker worker_threads.Worker;

靜態屬性

isMainThread

Boolean, 查詢當前 Worker 是不是主線程

1
static readonly Boolean worker_threads.isMainThread;