]> granicus.if.org Git - python/commitdiff
Add comment.
authorRaymond Hettinger <python@rcn.com>
Tue, 11 Jan 2011 22:08:55 +0000 (22:08 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 11 Jan 2011 22:08:55 +0000 (22:08 +0000)
Lib/functools.py

index 1062a452e6bf691ca7ebdd3bb7575cc3457cf749..03de69ae161ad54e42d8ad3d5e8958237b44aca8 100644 (file)
@@ -141,7 +141,7 @@ def lru_cache(maxsize=100):
 
         hits = misses = 0
         kwd_mark = object()             # separates positional and keyword args
-        lock = Lock()
+        lock = Lock()                   # needed because ordereddicts aren't threadsafe
 
         if maxsize is None:
             cache = dict()              # simple cache without ordering or size limit