On 28/11/2014 12:46, Peter Lieven wrote: > > I get: > > Run operation 40000000 iterations 9.883958 s, 4046K operations/s, 247ns per > > coroutine > > Ok, understood, it "steals" the whole pool, right? Isn't that bad if we have > more > than one thread in need of a lot of coroutines?
Overall the algorithm is expected to adapt. The N threads contribute to the global release pool, so the pool will fill up N times faster than if you had only one thread. There can be some variance, which is why the maximum size of the pool is twice the threshold (and probably could be tuned better). Benchmarks are needed on real I/O too, of course, especially with high queue depth. Paolo