-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
The documentation doesn't state whether functools.lru_cache (and decorators derived from it like functools.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
lossyrob, ikalchev, dgiger42, heiner, TTV-DJMoleHill and 4 more
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir