diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-29 17:04:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-10-29 17:04:03 -0400 |
commit | e2ee02338eda7f956723b88ee644db885ec7b849 (patch) | |
tree | c0640b392ddb370d22ed99ae32fb628699e0b351 | |
parent | b58baca45594a483224a2fd50bfd768de92fc4bf (diff) | |
download | dogpile-core-e2ee02338eda7f956723b88ee644db885ec7b849.tar.gz |
no, ad hoc
-rw-r--r-- | docs/build/usage.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/build/usage.rst b/docs/build/usage.rst index 6d4f950..8684297 100644 --- a/docs/build/usage.rst +++ b/docs/build/usage.rst @@ -227,10 +227,10 @@ pass to :class:`.Lock` using the ``key`` argument:: def decorate(fn): # ... gen_cached() from the previous example goes here - # create an ad-hoc FileLock - mutex = lockfile.FileLock(lock_path) - def invoke(): + # create an ad-hoc FileLock + mutex = lockfile.FileLock(lock_path) + with Lock(mutex, gen_cached, get_value, expiration_time) as value: return value return invoke |