-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Shelve sync issues while using Gevent #79805
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
Comments
Shelve method, sync, does not work when using gevent threading. |
Hi, thanks for opening a bug report. Can you provide a script that reproduce the issue? |
3.6 only gets security fixes. Please verify that there is a problem in 3.8 (or at least 3.7) Also demonstrate that issue is not with the 3rd party gevent module. Does gevent includes compiled non-python code? (I suspect it does, but don't know.) If so, your script should *not* import that extension. Or you should close this as '3rd party' and submit a report to the gevent authors, who should be better able to determine where the problem originates. |
The docs already note a restriction: "the shelve module does not support concurrent read/write access to shelved objects". We should further document that sync() is not thread-safe. When sync() is running, the *writeback* attribute is set to False and other threads will stop updating the cache. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
Linked PRs
Shelve.sync()
is not thread-safe. #127507The text was updated successfully, but these errors were encountered: