We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Migrated issue, originally created by Michael Bayer (zzzeek)
#!python diff -r 2421b6447c65442f6ae0d410629382701da035c3 dogpile/cache/backends/file.py --- a/dogpile/cache/backends/file.py Tue Nov 20 17:48:17 2012 -0500 +++ b/dogpile/cache/backends/file.py Mon Dec 10 14:11:24 2012 -0500 @@ -213,14 +213,18 @@ @contextmanager def read(self): self.acquire_read_lock(True) - yield - self.release_read_lock() + try: + yield + finally: + self.release_read_lock() @contextmanager def write(self): self.acquire_write_lock(True) - yield - self.release_write_lock() + try: + yield + finally: + self.release_write_lock() def acquire_read_lock(self, wait): return self._acquire(wait, os.O_RDONLY, fcntl.LOCK_SH)
The text was updated successfully, but these errors were encountered:
Michael Bayer (zzzeek) wrote:
c9c29f4
Sorry, something went wrong.
Changes by Michael Bayer (zzzeek):
No branches or pull requests
Migrated issue, originally created by Michael Bayer (zzzeek)
The text was updated successfully, but these errors were encountered: