Adds a task to the queue, which can be either a simple asynchronous function or an array containing a function and its abort handler.
The asynchronous task function or a tuple containing the task and an abort function.
Optional
abort: (() => void)An optional abort function for the task.
Manages a queue of asynchronous tasks, each potentially with an abort mechanism. The queue supports concurrency control and optional delay between task executions.
Example
Remarks
This queue class is designed to help manage asynchronous tasks that might need to be aborted. It is ideal for scenarios where tasks are initiated based on external events and might need to be cancelled if conditions change.