summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index df27387..a746dee 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -238,6 +238,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