The maximum number of tasks which can be simultaneously attempted.
The number of pending tasks remaining in the queue
The number of actively executing tasks
Add a new tasks to the managed queue
A callable function
A promise that resolves once the added function is executed
Abandon any tasks which have not yet concluded
Attempt to perform a task from the queue. If all workers are busy, do nothing. If successful, try again.
A simple Semaphore implementation which provides a limited queue for ensuring proper concurrency.
The maximum number of tasks which are allowed concurrently.
Using a Semaphore