File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1111,7 +1111,6 @@ def lock(
1111
1111
Note this value can be overridden by passing a ``blocking``
1112
1112
argument to ``acquire``.
1113
1113
1114
-
1115
1114
``blocking_timeout`` indicates the maximum amount of time in seconds to
1116
1115
spend trying to acquire the lock. A value of ``None`` indicates
1117
1116
continue trying forever. ``blocking_timeout`` can be specified as a
Original file line number Diff line number Diff line change @@ -801,6 +801,7 @@ def lock(
801
801
name ,
802
802
timeout = None ,
803
803
sleep = 0.1 ,
804
+ blocking = True ,
804
805
blocking_timeout = None ,
805
806
lock_class = None ,
806
807
thread_local = True ,
@@ -816,6 +817,12 @@ def lock(
816
817
when the lock is in blocking mode and another client is currently
817
818
holding the lock.
818
819
820
+ ``blocking`` indicates whether calling ``acquire`` should block until
821
+ the lock has been acquired or to fail immediately, causing ``acquire``
822
+ to return False and the lock not being acquired. Defaults to True.
823
+ Note this value can be overridden by passing a ``blocking``
824
+ argument to ``acquire``.
825
+
819
826
``blocking_timeout`` indicates the maximum amount of time in seconds to
820
827
spend trying to acquire the lock. A value of ``None`` indicates
821
828
continue trying forever. ``blocking_timeout`` can be specified as a
@@ -858,6 +865,7 @@ def lock(
858
865
name ,
859
866
timeout = timeout ,
860
867
sleep = sleep ,
868
+ blocking = blocking ,
861
869
blocking_timeout = blocking_timeout ,
862
870
thread_local = thread_local ,
863
871
)
You can’t perform that action at this time.
0 commit comments