You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workerpool allows each thread to process only a single task at a time, which means that each task must be strictly CPU-bound, and any IO makes the pool work inefficiently.
The library was originally intended for CPU heavy tasks, not for async tasks with IO.
It can be interesting to think though what is needed to add support for starting multiple async tasks with IO on the same worker. Anyone interested in picking this up?
Workerpool allows each thread to process only a single task at a time, which means that each task must be strictly CPU-bound, and any IO makes the pool work inefficiently.
At the same time, there are some traits of supporting multiple parallel tasks per threads in the code: https://github.com/josdejong/workerpool/blob/master/src/WorkerHandler.js#L332 - I think this is for the case when the thread is in "wait for ready" state only though, and due to this check: https://github.com/josdejong/workerpool/blob/master/src/Pool.js#L248 - it never schedules more than 1 task to a "busy" thread.
Piscina has a feature of scheduling multiple tasks to the same thread.
Are there any plans to implement the similar thing in workerpool (considering that the most of the infrastructure for this is already in the code)?
Repro of the serialization:
The text was updated successfully, but these errors were encountered: