Yusuke Tsutsumi added the comment:

I'm interested in taking this on. I can do the following:

* keep track of the threads in a field attached to the class
* handle thread synchronization and cleanup in the finally block
* set a flag on the exception, which ensures the loop completes, vs immediately 
passing.

The part I'm unclear on is a good garbage collection strategy. I'm thinking:

* set some configurable period to clean up the threads (every 10s by default. 
Rapid enough to ensure cleanup, but not fast enough to run every time and 
significantly slow down responses)
* at the specific threshold, run the cleanup script.
* on cleanup, check every thread if it's alive. explicit del the ones that are 
not. 

If it sounds good, I can start a patch.

----------
nosy: +Yusuke Tsutsumi

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

Reply via email to