Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0580cbb + fd54117 commit dacb685Copy full SHA for dacb685
1 file changed
Lib/functools.py
@@ -17,9 +17,9 @@
17
pass
18
from collections import namedtuple
19
try:
20
- from _thread import allocate_lock as Lock
+ from _thread import RLock
21
except:
22
- from _dummy_thread import allocate_lock as Lock
+ from dummy_threading import RLock
23
24
25
################################################################################
@@ -232,7 +232,7 @@ def decorating_function(user_function):
232
hits = misses = 0
233
full = False
234
cache_get = cache.get # bound method to lookup a key or return None
235
- lock = Lock() # because linkedlist updates aren't threadsafe
+ lock = RLock() # because linkedlist updates aren't threadsafe
236
root = [] # root of the circular doubly linked list
237
root[:] = [root, root, None, None] # initialize by pointing to self
238
0 commit comments