At some point you might get limited by the Queue
class as a data-structure. You have to add methods for new features, that break the definition of a Queue
.
-
Multi threaded
dequeue()
: Maybe you want to break the limit of "one request after the other". E.g. run up to max 5 tasks parallel. You can replacethis._pendingPromise
(true|false
) flag with a counter and check insinsidedequeue()
.
async dequeue() {