Message96050
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). |
|
Date |
User |
Action |
Args |
2009-12-07 14:22:21 | scott.dial | set | recipients:
+ scott.dial, barry, rhettinger, ncoghlan, janssen, kevinwatters, benjamin.peterson, r.david.murray, rmore, rtucker |
2009-12-07 14:22:20 | scott.dial | set | messageid: <1260195740.82.0.597638359456.issue5949@psf.upfronthosting.co.za> |
2009-12-07 14:22:19 | scott.dial | link | issue5949 messages |
2009-12-07 14:22:18 | scott.dial | create | |
|