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:25:14
SpamBayes Score 0.0006816329
Marked as misclassified No
Message-id <1311697515.04.0.651274177774.issue12463@psf.upfronthosting.co.za>
In-reply-to
Content
In my case, exception occured in separate thread between the begginig of the thread and starting loop.

Main thread has a code that correctly stops that separate thread. It just calls loop_thread.server.server_close() and after that, calls loop_thread.join()

So, if program termination required, but loop was not started, deadlock occur. Moreover, I can not detect if loop was started. And more more over, if I detect that loop was not started, there is chance, that it may be started a bit later, next after my checking. In that case, either loop will not be terminated correctly (if process exits) or join() may block.

So, please DO NOT ADD detection if loop was started. That will generate race-conditions in user code. I think it's never needed. If one wants to detect that, one may use separate variable:
{code}
started = True
xxx.serve_forever() 
{code}
History
Date User Action Args
2011-07-26 16:25:15socketpairsetrecipients: + socketpair, pitrou, giampaolo.rodola, neologix, santoso.wijaya, petri.lehtinen
2011-07-26 16:25:15socketpairsetmessageid: <1311697515.04.0.651274177774.issue12463@psf.upfronthosting.co.za>
2011-07-26 16:25:14socketpairlinkissue12463 messages
2011-07-26 16:25:14socketpaircreate