These methods are event oriented and should not have been using promises.
A promise is intended to only be resolved once, however this library is expecting to resolve them multiple times.
https://stackoverflow.com/questions/20328073/is-it-safe-to-resolve-a-promise-multiple-times
these API's need to be altered to queue.onIdle(() => { }); and register an array of callbacks,
or ideally, use an EventEmitter style API and do queue.on('idle', () => { });
these existing API's can be altered to forward to the new preferred API by returning something like
return {
then(cb) { this.on('idle', cb); return this; }
catch (e) { } //unused, but part of promise expectation
}
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