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)!

11 lines (9 loc) 205 B
'use strict'; module.exports = class { constructor(file, args, msgID, workerID = -1) { this.file = file; this.args = args; this.msgID = msgID; this.workerID = workerID; } };