Message279144
If each worker thread ties up other resources in an application, such as handles to server connections, conserving threads could have a significant impact. That's the situation for an application I am involved with.
I've written and tested a patch to make this change, using a second Queue for the worker threads to notify the executor in the main thread by sending a None when they finish a WorkItem and are therefore idle and ready for more work. It's a fairly simple patch. It does add a little more overhead to executing a job, inevitably. I can submit the patch if there's interest. Otherwise, perhaps the TODO comment in thread.py should be rewritten to explain why it's not worth doing. |
|
Date |
User |
Action |
Args |
2016-10-21 17:54:16 | dmacnet | set | recipients:
+ dmacnet, torsten, josh.r, Matt Spitz |
2016-10-21 17:54:16 | dmacnet | set | messageid: <1477072456.41.0.495456862009.issue24882@psf.upfronthosting.co.za> |
2016-10-21 17:54:16 | dmacnet | link | issue24882 messages |
2016-10-21 17:54:16 | dmacnet | create | |
|