HsCircPool: Launch multiple background circuits in parallel.
Right now there is an opportunity to launch more circuits at once in HsCircPool.
- In
launch_hs_circuits_as_needed
, when we find that we have fewer circuits than we would like, we only build one circuit at a time, even if we would like to have a much larger number of circuits. - In
take_or_launch_stub_circuit
, when we find that we have no circuits left in our pool, we only build a single circuit at a time.
Launching multiple circuits in parallel here could improve performance by letting us take whichever circuit is ready first. (But should we think about delay-based attacks, where an attacker slows down some of our circuits in hopes that other circuits that it likes better will get finished first?)