File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,8 @@ The :mod:`functools` module defines the following functions:
5757 another thread makes an additional call before the initial call has been
5858 completed and cached.
5959
60- In particular, when the same key is computed concurrently in multiple
61- threads, each thread may execute the wrapped function independently
62- before the first result is stored in the cache. As a consequence, the
63- return values from these concurrent calls may be distinct objects even
64- though they correspond to the same cache key.
65-
66- This behavior means that ``lru_cache `` should not be relied upon for
67- singleton object creation or other scenarios requiring that only one
68- instance be constructed for a given key without external synchronization.
60+ Call-once behavior is not guaranteed: no locks are held during the function
61+ call, so the same key may be computed multiple times concurrently.
6962
7063 .. versionadded :: 3.9
7164
You can’t perform that action at this time.
0 commit comments