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
@@ -143,8 +148,13 @@ The :mod:`functools` module defines the following functions:
143148 *maxsize * most recent calls. It can save time when an expensive or I/O bound
144149 function is periodically called with the same arguments.
145150
146- The cache is threadsafe so the wrapped function can be used in multiple
147- threads.
151+ The cache is threadsafe so that the wrapped function can be used in
152+ multiple threads. This means that the underlying data structure will
153+ remain coherent during concurrent updates.
154+
155+ It is possible for the wrapped function to be called more than once if
156+ another thread makes an additional call before the initial call has been
157+ completed and cached.
148158
149159 Since a dictionary is used to cache results, the positional and keyword
150160 arguments to the function must be :term: `hashable `.
You can’t perform that action at this time.
0 commit comments