promise-throttle
promise-throttle copied to clipboard
unexpected weight behaviour
Hello,
I've implemented PromiseThrottle with 1 call per second and with default weight except one call with a weight of 3. So i was expected that this call has been launched just after the last and the next call to be launched 3 times later. But the only things the weight seems to do is to apply some kind of timeout before it was launched and not before the next call. To be clear here, a screenshot of devtools network tab where you can see what i mean.
Why heaviest call begins 3 seconds after ? And why this is not the next call which get that behaviour ?
thanks