Simple thread pool with a microtask-based queue.
Timer-free: browsers clamp nested setTimeout(0) to several ms, which stalls queued tasks.
Construct the thread pool.
Optional
maximum number of threads in the pool (default 1)
Protected
Await all functions to complete.
resolves when all functions complete
Submit an asynchronous function to run using the thread pool.
asynchronous function to run with the thread pool
resolves when the function completes execution
Generated using TypeDoc
Simple thread pool with a microtask-based queue.
Timer-free: browsers clamp nested setTimeout(0) to several ms, which stalls queued tasks.