File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,13 @@ The :mod:`functools` module defines the following functions:
4949 >>> factorial(12) # makes two new recursive calls, the other 10 are cached
5050 479001600
5151
52- The cache is threadsafe so the wrapped function can be used in multiple
53- threads.
52+ The cache is threadsafe so that the wrapped function can be used in
53+ multiple threads. This means that the underlying data structure will
54+ remain coherent during concurrent updates.
55+
56+ It is possible for the wrapped function to be called more than once if
57+ another thread makes an additional call before the initial call has been
58+ completed and cached.
5459
5560 .. versionadded :: 3.9
5661
@@ -158,8 +163,13 @@ The :mod:`functools` module defines the following functions:
158163 *maxsize * most recent calls. It can save time when an expensive or I/O bound
159164 function is periodically called with the same arguments.
160165
161- The cache is threadsafe so the wrapped function can be used in multiple
162- threads.
166+ The cache is threadsafe so that the wrapped function can be used in
167+ multiple threads. This means that the underlying data structure will
168+ remain coherent during concurrent updates.
169+
170+ It is possible for the wrapped function to be called more than once if
171+ another thread makes an additional call before the initial call has been
172+ completed and cached.
163173
164174 Since a dictionary is used to cache results, the positional and keyword
165175 arguments to the function must be :term: `hashable `.
You can’t perform that action at this time.
0 commit comments