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
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
I started using the utils/Async.PromiseQueue for an extension I'm creating (mostly for myself but will be available on GitHub when it's done). PromiseQueue is great, except when a promise in the queue is rejected, and then all of the potential promises in the queue are stuck and not run.
I took a look in the master branch code to look for the issue and indeed, in src/utils/Async in line 490, the PromiseQueue only attaches on the resolved state of the current promise ( .done() ). According to the JSDoc comment on top of .add(), the queue is supposed to go to the next promise regardless if the state of the current promise is resolved or rejected, meaning it should add itself to the current promise's .always().
For a quick fix in my extension, I extended the PromiseQueue to override the .add() function to use .always() instead of .done().
I started using the utils/Async.PromiseQueue for an extension I'm creating (mostly for myself but will be available on GitHub when it's done). PromiseQueue is great, except when a promise in the queue is rejected, and then all of the potential promises in the queue are stuck and not run.
I took a look in the master branch code to look for the issue and indeed, in src/utils/Async in line 490, the PromiseQueue only attaches on the resolved state of the current promise (
.done()). According to the JSDoc comment on top of.add(), the queue is supposed to go to the next promise regardless if the state of the current promise is resolved or rejected, meaning it should add itself to the current promise's.always().For a quick fix in my extension, I extended the PromiseQueue to override the
.add()function to use.always()instead of.done().