UNPKG

@mcjxy/task-pool

Version:

Easy way to manage a pool of workers, support cluster mode(run tasks in different process), thread mode(run tasks in different thread) and normal mode(run tasks in current thread)!

12 lines (10 loc) 252 B
'use strict'; module.exports = class { constructor(msgType, result, error, msgID, workerID = -1) { this.msgType = msgType; this.result = result; this.error = error; this.msgID = msgID; this.workerID = workerID; } };