-
-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document the thread safety of functools.lru_cache
#93179
Labels
docs
Documentation in the Doc dir
Comments
rhettinger
added a commit
to rhettinger/cpython
that referenced
this issue
Aug 13, 2022
rhettinger
added a commit
that referenced
this issue
Aug 18, 2022
rhettinger
added a commit
that referenced
this issue
Aug 21, 2022
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Dec 24, 2022
…thonGH-95970) (cherry picked from commit ba4bb7e) Co-authored-by: Raymond Hettinger <[email protected]>
miss-islington
added a commit
that referenced
this issue
Dec 24, 2022
(cherry picked from commit ba4bb7e) Co-authored-by: Raymond Hettinger <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation
The documentation doesn't state whether
functools.lru_cache
(and decorators derived from it likefunctools.cache
) are thread safe, meaning that it's not clear that it's safe to (for example) populate the cache by running the function in multiple threads. The comments in the source code certainly imply that it's intended to be thread safe, but I'll admit I haven't double checked all the details.Can the thread safety be made explicit in the docs?
Linked PRs
The text was updated successfully, but these errors were encountered: