Martin Panter added the comment:

Michael’s patch looks like it adds some backwards compatibility problems. The 
forking server overwrites a signal handler, and shutdown() no longer seems to 
wait at all.

It seems that people want shutdown() to do different things. Mark doesn’t want 
it to wait for the server in case an exception stops serve_forever() from 
starting its loop. So he has to rely on join() rather than just shutdown() to 
ensure that serve_forever() will no longer run.

Antoine wants shutdown() to guarantee that serve_forever() has stopped. So he 
has to hope that no exception (e.g. KeyboardInterrupt) prevents serve_forever() 
from starting. I think I agree with this. If you want to do extra processing 
before calling serve_forever(), maybe use an exception handler, different 
thread, or synchronization mechanism to avoid the lockout problem instead. I 
suggest just documenting the way things work and leaving it at that.

----------
nosy: +martin.panter

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

Reply via email to