diff options
author | Raymond Hettinger <python@rcn.com> | 2013-03-01 11:48:30 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-03-01 11:48:30 (GMT) |
commit | dacb6858e88b6c4cb4659400e73b81e88864a7fa (patch) | |
tree | f9330f7a6a25008df789dfa8904267527ac42cf9 /Lib/functools.py | |
parent | 0580cbb1640d38a98677e36bc0947b0ec1064c26 (diff) | |
parent | fd54117a682224200ce057a60b0205b0e13948d2 (diff) | |
download | cpython-dacb6858e88b6c4cb4659400e73b81e88864a7fa.zip cpython-dacb6858e88b6c4cb4659400e73b81e88864a7fa.tar.gz cpython-dacb6858e88b6c4cb4659400e73b81e88864a7fa.tar.bz2 |
Merge
Diffstat (limited to 'Lib/functools.py')
-rw-r--r-- | Lib/functools.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/functools.py b/Lib/functools.py index 2647f2d..c71d714 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -17,9 +17,9 @@ except ImportError: pass from collections import namedtuple try: - from _thread import allocate_lock as Lock + from _thread import RLock except: - from _dummy_thread import allocate_lock as Lock + from dummy_threading import RLock ################################################################################ @@ -232,7 +232,7 @@ def lru_cache(maxsize=128, typed=False): hits = misses = 0 full = False cache_get = cache.get # bound method to lookup a key or return None - lock = Lock() # because linkedlist updates aren't threadsafe + lock = RLock() # because linkedlist updates aren't threadsafe root = [] # root of the circular doubly linked list root[:] = [root, root, None, None] # initialize by pointing to self |