Open LeonidPolukhin opened 2 months ago
Worker returns Transfer object like
const array = new Float32Array(data); return new workerpool.Transfer(array, [array.buffer]);
In worker.js:
if (result instanceof Transfer) { worker.send({ id: request.id, result: result.message, error: null }, result.transfer); }
but worker.send (message) takes only one argument skipping transfer so no transferring happens. See worker.js: 27
worker.send = function (message) { postMessage(message); };
Worker returns Transfer object like
In worker.js:
but worker.send (message) takes only one argument skipping transfer so no transferring happens. See worker.js: 27