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.
1 parent ca9bfe1 commit 34d94a2Copy full SHA for 34d94a2
1 file changed
Lib/functools.py
@@ -241,6 +241,12 @@ def wrapper(*args, **kwds):
241
return result
242
result = user_function(*args, **kwds)
243
with lock:
244
+ if key in cache:
245
+ # getting here means that this same key was added to the
246
+ # cache while the lock was released. since the link
247
+ # update is already done, we need only return the
248
+ # computed result and update the count of misses.
249
+ pass
250
if currsize < maxsize:
251
# put result in a new link at the front of the queue
252
last = root[PREV]
0 commit comments