With p-limit, we can update the concurrency dynamically on the fly. For example:
const queue = pLimit(4) // Starts at 4
queue(() => fetch(url))
// Drop the limit for slow networks
queue.concurrency = 2
// Increase the limit for fast networks
queue.concurrency = 8
With
p-limit, we can update the concurrency dynamically on the fly. For example: