Does anyone know of good templates / libraries to bring together web workers?
I want to do something like the following:
- Set the maximum number of threads.
- The first time I ask an employee to create a new one.
- Next time, he will return the previous Worker if he has not completed the operation, in which case he will create a new one and return it.
- As soon as we reach the maximum, he will begin requests for priority for workers and will begin them when the worker becomes available.
- It is currently assumed that the pool will use the same .js file.
Or is there a better approach to this?
source share