Ben <benjsim...@gmail.com> added the comment:

This is a duplicate of https://bugs.python.org/issue45274
but the patch there did not fix it

I've just added a PR there (or should it go here?) that (i think) fixes this.

The issue is that the lock.locked() call just checks that *someone* has the 
lock, not that the previous acquire() is what got the lock.
If it's just that the tstate lock is held because the thread is still running,  
then it's premature to release() the lock.

----------
nosy: +bjs

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46726>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to