slytomcat added the comment:

One more problem that adjusting of number of threads is performed exactly after 
placing the new task in the queue. In in some cases we can find that qsuze <> 0 
but it doesn't mean that there is no idle threads. It can be equal to 1 (just 
queued task) as no threads manage to get it yet (don't forgot about GIL).

So even qsuze <> 0 dosn't mean that we need to create a new thread.

But (unfinished() <= num_threads) works perfect in this case also.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29603>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to