Investigating #433 I tracked it down to a situation where an overflow in 32-bit architectures can result in a calculation of concurrency = 0. With zero concurrency… the wg.Wait() returns immediately and no work is done.
The solution is to check if concurrency is less than one, and if it is, then use max concurrency, as we overflowed an int32, so it should use max concurrency.
Investigating #433 I tracked it down to a situation where an overflow in 32-bit architectures can result in a calculation of
concurrency = 0
. With zero concurrency… thewg.Wait()
returns immediately and no work is done.The solution is to check if concurrency is less than one, and if it is, then use max concurrency, as we overflowed an int32, so it should use max concurrency.