Build a list of progress bars that fill concurrently, but at most three at a time. Where Progress Bars II ran them strictly one-by-one, this version runs a pool: three fill together, and the moment one finishes, the next waiting bar takes its place. It's the classic concurrency-limit (a.k.a. rate-limit / worker-pool) problem, rendered as progress bars.
// A self-contained component. No props.
function App(): JSX.Element;
Several bars where no more than three are ever filling simultaneously; completing one starts the next pending bar.
start: bars 0,1,2 filling | 3,4,5 waiting
bar 1 done: bars 0,2,3 filling | 4,5 waiting (3 took 1's slot)
bar 0 done: bars 2,3,4 filling | 5 waiting
… until all six are done
Invariant: count(running) ≤ 3 at all times. A freed slot is immediately
filled by the next pending bar (if any).
transitionend to know it's done.