Web Worker Thread Pool

I have developed a Javascript Excel Add-in that uses a Web Worker to make background / long-running service API requests. The user determines how many requests need to be made, and the results are then written to a worksheet in the workbook. This works fine, however as the number of requests increases the serice API provider can get overwhelmed.

Ideally I would like to have some sort of thread pool of Web Workers that could process the API requests from a queue – per the following example in Java:

https://www.baeldung.com/thread-pool-java-and-guava

Executor Service

The number of worker threads could be configured by the user based upon the API service provider capabilities.

Based upon a search of the site I cannot find any precedent, and would appreciate thoughts.

Cheers,
Andrew