hongweipeng <hongweichen8...@sina.com> added the comment:
It seems to me the problem is related to nested `finally` or `with`, which can't handle signals well. class Event: ... def wait(self, timeout=None): self._cond.__enter__() signaled = self._flag if not signaled: signaled = self._cond.wait(timeout) self._cond.__exit__() return signaled Reducing one layer of nesting can solve this issue,but it can't pass `test` module. ---------- nosy: +hongweipeng _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34486> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com