Message260070
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. |
|
Date |
User |
Action |
Args |
2016-02-11 03:26:40 | martin.panter | set | recipients:
+ martin.panter, pitrou, giampaolo.rodola, neologix, santoso.wijaya, socketpair, tshepang, petri.lehtinen, Arcege |
2016-02-11 03:26:40 | martin.panter | set | messageid: <1455161200.37.0.956225076159.issue12463@psf.upfronthosting.co.za> |
2016-02-11 03:26:40 | martin.panter | link | issue12463 messages |
2016-02-11 03:26:39 | martin.panter | create | |
|