This will allow us to extend the existing priority queue to make methods that change to the underlying structure for example "remove" to remove entries from the promise queue for scenarios like an image component getting unmounted so there's no point in keeping the promise of downloading the image.
Right now I am copying the class and adding the new method
removeWithPredicate(predicate: (entry: PriorityQueueOptions & { run: RunFunction }) => boolean): void {
let i, j;
for (i = 0, j = 0; i < this._queue.length; ++i) {
if (predicate(this._queue[i])) {
this._queue[j] = this._queue[i];
++j;
}
}
while (j < this._queue.length) {
this._queue.pop();
}
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too