mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
utils/misc: Use an RLock in tls_property
Allow reentrancy of the lock to fix a deadlock that can occur if self._get_tls() is called while holding the lock.
This commit is contained in:
parent
f523afda95
commit
80c0e37d11
@ -784,7 +784,7 @@ class tls_property:
|
||||
def __init__(self, factory):
|
||||
self.factory = factory
|
||||
# Lock accesses to shared WeakKeyDictionary and WeakSet
|
||||
self.lock = threading.Lock()
|
||||
self.lock = threading.RLock()
|
||||
|
||||
def __get__(self, instance, owner=None):
|
||||
return _BoundTLSProperty(self, instance, owner)
|
||||
|
Loading…
x
Reference in New Issue
Block a user