mirror of
https://github.com/python/cpython.git
synced 2025-08-09 03:19:15 +00:00
[3.12] gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629) (#109898)
gh-109593: Fix reentrancy issue in multiprocessing resource_tracker (GH-109629)
---------
(cherry picked from commit 0eb98837b6
)
Co-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
84f9da9ab5
commit
b723b8a13d
7 changed files with 95 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue