Would be nice to be able to provide a stream and/or async iterable (of buffers) as argument and have is seamlessly (using transferable) accessible in the worker.
e.g.
const handle = await fs.open(dst)
try {
for await (const buf of worker.runTask(fs.createReadStream(src))) {
await handle.write(buf)
}
} finally {
await handle.close()
}
module.exports = async function * (source) {
for await (const buf of source) {
yield veryExpensiveProcessing(buf)
}
}