site/node_modules/workerpool/src/transfer.js

13 lines
370 B
JavaScript
Raw Normal View History

2024-10-14 08:09:33 +02:00
/**
* 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;