-
Notifications
You must be signed in to change notification settings - Fork 137
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
Filesystem backend: Add optional file lock for multiprocess usage #603
Comments
I've used it with (a monkey patch to use) multiprocessing.RLock() as my use case would normally be ok with threading but if I cache I'm CPU bound so I need multiprocessing so I can avoid GIL throttling |
Note that |
True, but that was what I was doing, |
Currently, the filesystem backend uses a simple threading lock for thread safety. To be safe for multiple processes, it will need a file-level locking mechanism, like py-filelock. That could be added as an optional dependency, and enabled with a keyword argument.
Please comment if this is something you have a use case for!
The text was updated successfully, but these errors were encountered: