Марк Коренберг <socketp...@gmail.com> added the comment:
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. ---------- _______________________________________ 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