This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2011-07-26 16:39:29socketpairsetrecipients: + socketpair, pitrou, giampaolo.rodola, neologix, santoso.wijaya, petri.lehtinen
2011-07-26 16:39:29socketpairsetmessageid: <1311698369.87.0.796370744712.issue12463@psf.upfronthosting.co.za>
2011-07-26 16:39:29socketpairlinkissue12463 messages
2011-07-26 16:39:29socketpaircreate