It is confusing if throttledFn.abort() stops all pending calls to execute since it is a method on a single throttledFn.
I'm trying to schedule a bunch of http calls in an array and then calling Promise.all :
const throttle = pThrottle(...);
cons arr = [1,2,3];
const promises = arr.map( num => throttle(makeHttpReq(num)) );
try {
await Promise.all(promises)
} catch (e) {
promises[0].abort() // seems weird that I need a throttleFn to achieve this
}
Maybe I'm trying to use this lib for something it wasn't meant to do ?
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