Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dacb685

Browse files
committed
Merge
2 parents 0580cbb + fd54117 commit dacb685

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/functools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
pass
1818
from collections import namedtuple
1919
try:
20-
from _thread import allocate_lock as Lock
20+
from _thread import RLock
2121
except:
22-
from _dummy_thread import allocate_lock as Lock
22+
from dummy_threading import RLock
2323

2424

2525
################################################################################
@@ -232,7 +232,7 @@ def decorating_function(user_function):
232232
hits = misses = 0
233233
full = False
234234
cache_get = cache.get # bound method to lookup a key or return None
235-
lock = Lock() # because linkedlist updates aren't threadsafe
235+
lock = RLock() # because linkedlist updates aren't threadsafe
236236
root = [] # root of the circular doubly linked list
237237
root[:] = [root, root, None, None] # initialize by pointing to self
238238

0 commit comments

Comments
 (0)