Message141808
> Why do you say it "hangs"? It doesn't hang, it just waits for you to
> call serve_forever(): it's not a bug, it's actually a feature.
Okay, for my case, How I should correctly terminate thread?
Conditions:
1. signal may appear at any time
2. thread may become non-alive in any time - either before server_forever (due to exception) or after.
So, after breaking main loop, I should correctly "terminate" thread. I can not say if thread is running. checking isAlive is racy. Even when thread is alive, this is unknown if server_forever was called. Even if serve_forever was not called, we should not rely on calling this ones, because thread may be interrupted by exception before calling serve_forever.
Once again: why not to add patch suggested by Petri Lehtinen ? |
|
Date |
User |
Action |
Args |
2011-08-09 03:08:43 | socketpair | set | recipients:
+ socketpair, pitrou, giampaolo.rodola, neologix, santoso.wijaya, petri.lehtinen |
2011-08-09 03:08:43 | socketpair | set | messageid: <1312859323.82.0.218610556782.issue12463@psf.upfronthosting.co.za> |
2011-08-09 03:08:43 | socketpair | link | issue12463 messages |
2011-08-09 03:08:42 | socketpair | create | |
|