diff options
Diffstat (limited to 'Lib/threading.py')
-rw-r--r-- | Lib/threading.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/threading.py b/Lib/threading.py index f6bbdb0d0c8..31cefd2143a 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -245,6 +245,13 @@ class _RLock: def _is_owned(self): return self._owner == get_ident() + # Internal method used for reentrancy checks + + def _recursion_count(self): + if self._owner != get_ident(): + return 0 + return self._count + _PyRLock = _RLock |