This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author scott.dial
Recipients barry, benjamin.peterson, janssen, kevinwatters, ncoghlan, r.david.murray, rhettinger, rmore, rtucker, scott.dial
Date 2009-12-07.14:22:15
SpamBayes Score 0.0005524045
Marked as misclassified No
Message-id <1260195740.82.0.597638359456.issue5949@psf.upfronthosting.co.za>
In-reply-to
Content
The design of your patch makes a lot of sense. I found that your patch
uncovered a problem with using the ThreadingMixin (which is ultimately
not necessary as long as the whole SocketServer is in its own thread). I
rewrote the SimpleIMAPHandler to timeout in a timely manner and for the
reap_server() to actually ensure that all threads have been shutdown.

I ended up rewriting my patch in steps towards yours before I uncovered
why I was getting threads alive at shutdown. In that vein, the patch I
am attaching uses the "with reaped_server(hdlr) as server:" technique,
but it could be converted to use an attribute instead. I find using
"with" easier to read and less error prone (failing shutdown the server
and thread because human error or an uncaught exception).
History
Date User Action Args
2009-12-07 14:22:21scott.dialsetrecipients: + scott.dial, barry, rhettinger, ncoghlan, janssen, kevinwatters, benjamin.peterson, r.david.murray, rmore, rtucker
2009-12-07 14:22:20scott.dialsetmessageid: <1260195740.82.0.597638359456.issue5949@psf.upfronthosting.co.za>
2009-12-07 14:22:19scott.diallinkissue5949 messages
2009-12-07 14:22:18scott.dialcreate