James M Snell
James M Snell
Piscina is optimized for processing a queue of tasks and not really well suited for a polling mechanism. For that, I would just use worker threads directly and avoid the...
That doesn't appear to work in combination with the `--ts` option and `ts-node`
@addaleax ... any suggestions?
Unfortunately we can't make streams *seamlessly* transferable/cloneable using move. The only objects that can be made transferable are core objects that extend from BaseObject. It would be possible to create...
Regarding this pattern.... I'm not sure this (an async generator as a worker) is a pattern that could work with the worker pool. Retaining the generator state would be problematic....
Possibly, but we still hit up against limitations on MessagePort. Lemme stew over it a bit
https://github.com/piscinajs/piscina/pull/170 illustrates using transferable whatwg readable and writable streams to an individual worker. It doesn't quite do what this issue is suggesting but it definitely gets a bit closer!
`BroadcastChannel` itself doesn't need to be transferred. You can create a new instance of `BroadcastChannel` in the worker using the same name and they will find each other.
Hmm... will have to investigate. @addaleax, any ideas?
It's not currently exposed, no. Generally it's not something we never anticipated people needing. Do you have a use case you can describe?