I'm working on a custom loader with asynchronous load promises, I want to change the priority of a specific promise function, can this be achieved using current code?
I managed to achieve something by queuing up the promise function again with updated priority, but this loads the item twice.
prioritize(key: string) {
const promise = this.taskList.get(key);
if (!promise) {
console.error("No such promise: ", key);
} else {
this.pause();
this.queue.add(promise, { priority: 2 });
this.resume();
}
}
Thanks.
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