You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there anyway to look at the tasks of a current queue to determine if the task you are about to put in might already match a task currently in the queue?
The text was updated successfully, but these errors were encountered:
There is no officially sanctioned way to iterate the queue. There is a q._tasks property that exposes the underlying linked list for the queue. You can either iterate the linked list, or call q._tasks.toArray().find(...) to see if your task already exists.
This is an implementation detail, so it is not documented. It might break in the future if we change how the queue works internally.
Although, as an enhancement to the queue, we could expose a q[Symbol.iterator] property for exposing an implementation-agnostic way to iterate the current items of the queue.
Is there anyway to look at the tasks of a current queue to determine if the task you are about to put in might already match a task currently in the queue?
The text was updated successfully, but these errors were encountered: