Марк Коренберг <socketp...@gmail.com> added the comment:
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} ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12463> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com