Message141169
| Author |
socketpair |
| Recipients |
giampaolo.rodola, neologix, petri.lehtinen, pitrou, santoso.wijaya, socketpair |
| Date |
2011年07月26日.16:39:29 |
| SpamBayes Score |
3.6231445e-09 |
| Marked as misclassified |
No |
| Message-id |
<1311698369.87.0.796370744712.issue12463@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Why you create variable mirror?
--------------------------
self.__running = False
self.__is_shut_down.set()
--------------------------
You other code is racy. exception may occur at any time.
Why not to test state of __is_shut_down directly ? In any case, server either running either not (i.e. is_shitdown or not is_shutdown). Server should not be tri-state in any case, as I think.
As the latest thing, that serve_forever does - is the calling self.__is_shut_down.set(). So it is reliable to detect state of the server via state of this lock. |
|