UNPKG

workerpool

Version:

Offload tasks to a pool of workers on node.js and in the browser

13 lines (11 loc) 370 B
/** * The helper class for transferring data from the worker to the main thread. * * @param {Object} message The object to deliver to the main thread. * @param {Object[]} transfer An array of transferable Objects to transfer ownership of. */ function Transfer(message, transfer) { this.message = message; this.transfer = transfer; } module.exports = Transfer;