Get the number of tasks currently waiting in the queue.
Get the number of workers currently processing a task.
Execute a task on an available worker thread.
The task specifies a module path and function name. The worker will dynamically import the module, call the function with the provided arguments, and return the result.
Task descriptor with module, function, and arguments.
Promise resolving to the function's return value.
Shut down all workers and reject queued and running tasks.
After calling shutdown, the pool cannot be reused.
A thread pool for offloading CPU-intensive cryptographic tasks to worker threads.
Example