[issue37883] threading.Lock.locked is not documented
Tal Einat
report at bugs.python.org
Fri Sep 27 16:13:19 EDT 2019
Tal Einat <taleinat at gmail.com> added the comment:
Looking at Lib/threading.py and Modules/_threadmodule.c, it actually appears that RLock.locked() is only implemented by the C implementation, but not the Python implementation which is used as a backup.
If we're going to make the locked() method more visible by documenting it, we should expose such a method on the Python implementation, so that threading.RLock will indeed always have a locked() method.
>From a quick look, it seems that the Python RLock's _is_owned() method might be just what we need, but that should be validated.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37883>
_______________________________________
More information about the Python-bugs-list
mailing list