Raymond Hettinger added the comment: Tim, do you remember why Condition.notify() went to great lengths to act as if the lock could be released after the check for self._is_owned()?
It loops over its own a copy of __waiters, and the __waiters.remove(waiter) code is wrapped in a try/except to detect a situation where __waiters mutated during the release-loop. I'm presuming that defensive programming was put there for a reason. ---------- nosy: +tim_one _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17385> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com