[issue18751] A manager's server never joins its threads

Yusuke Tsutsumi report at bugs.python.org
Sat Jun 4 17:41:37 EDT 2016


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 <report at bugs.python.org>
<http://bugs.python.org/issue18751>
_______________________________________


More information about the Python-bugs-list mailing list