[issue1703448] "t.join(); assert t not in threading.enumerate()" fails

Antoine Pitrou report at bugs.python.org
Tue Jan 22 01:05:35 CET 2008


Antoine Pitrou added the comment:

__delete() already acquires _active_limbo_lock so your proposal must be
changed for the following:

            with _active_limbo_lock:
                self.__stop()
                try:
                    del _active[_get_ident()]
                except:
                    pass

However, with this slight correction it seems to work. I was worrying
whether another thread could hold __block (which is acquired in
__stop()) while waiting for _active_limbo_lock to be released, but
AFAICT there doesn't seem to be a code path where it can happen...

_____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1703448>
_____________________________________


More information about the Python-bugs-list mailing list