Message288306
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. |
|
Date |
User |
Action |
Args |
2017-02-21 15:55:12 | slytomcat | set | recipients:
+ slytomcat, rhettinger, serhiy.storchaka |
2017-02-21 15:55:12 | slytomcat | set | messageid: <1487692512.32.0.778431192756.issue29603@psf.upfronthosting.co.za> |
2017-02-21 15:55:12 | slytomcat | link | issue29603 messages |
2017-02-21 15:55:12 | slytomcat | create | |
|