Skip to content

Commit 5b72987

Browse files
authored
Improve documentation about Lock (#1701)
1 parent e881976 commit 5b72987

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

redis/lock.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ def __init__(self, redis, name, timeout=None, sleep=0.1,
7676
Create a new Lock instance named ``name`` using the Redis client
7777
supplied by ``redis``.
7878
79-
``timeout`` indicates a maximum life for the lock.
79+
``timeout`` indicates a maximum life for the lock in seconds.
8080
By default, it will remain locked until release() is called.
8181
``timeout`` can be specified as a float or integer, both representing
8282
the number of seconds to wait.
8383
84-
``sleep`` indicates the amount of time to sleep per loop iteration
85-
when the lock is in blocking mode and another client is currently
86-
holding the lock.
84+
``sleep`` indicates the amount of time to sleep in seconds per loop
85+
iteration when the lock is in blocking mode and another client is
86+
currently holding the lock.
8787
8888
``blocking`` indicates whether calling ``acquire`` should block until
8989
the lock has been acquired or to fail immediately, causing ``acquire``

0 commit comments

Comments
 (0)