summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Mayeres <1524722+jerr0328@users.noreply.github.com>2021-11-14 11:52:57 +0100
committerGitHub <noreply@github.com>2021-11-14 12:52:57 +0200
commit5b72987e80a7765ce6e464232a7f1519243d0a73 (patch)
tree9e9a10498f781c7d9c8211aac41cc21c41631ca2
parente881976023cfc381aeaaec580c4b10b9ba62c0b6 (diff)
downloadredis-py-5b72987e80a7765ce6e464232a7f1519243d0a73.tar.gz
Improve documentation about Lock (#1701)
-rw-r--r--redis/lock.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/redis/lock.py b/redis/lock.py
index 326dbaf..d229752 100644
--- a/redis/lock.py
+++ b/redis/lock.py
@@ -76,14 +76,14 @@ class Lock:
Create a new Lock instance named ``name`` using the Redis client
supplied by ``redis``.
- ``timeout`` indicates a maximum life for the lock.
+ ``timeout`` indicates a maximum life for the lock in seconds.
By default, it will remain locked until release() is called.
``timeout`` can be specified as a float or integer, both representing
the number of seconds to wait.
- ``sleep`` indicates the amount of time to sleep per loop iteration
- when the lock is in blocking mode and another client is currently
- holding the lock.
+ ``sleep`` indicates the amount of time to sleep in seconds per loop
+ iteration when the lock is in blocking mode and another client is
+ currently holding the lock.
``blocking`` indicates whether calling ``acquire`` should block until
the lock has been acquired or to fail immediately, causing ``acquire``