@@ -155,21 +155,21 @@ This module defines the following constants and functions:
155
155
Lock objects have the following methods:
156
156
157
157
158
- .. method :: lock.acquire(waitflag=1 , timeout=-1)
158
+ .. method :: lock.acquire(blocking=True , timeout=-1)
159
159
160
160
Without any optional argument, this method acquires the lock unconditionally, if
161
161
necessary waiting until it is released by another thread (only one thread at a
162
162
time can acquire a lock --- that's their reason for existence).
163
163
164
- If the integer * waitflag * argument is present, the action depends on its
165
- value: if it is zero , the lock is only acquired if it can be acquired
166
- immediately without waiting, while if it is nonzero , the lock is acquired
164
+ If the * blocking * argument is present, the action depends on its
165
+ value: if it is False , the lock is only acquired if it can be acquired
166
+ immediately without waiting, while if it is True , the lock is acquired
167
167
unconditionally as above.
168
168
169
169
If the floating-point *timeout * argument is present and positive, it
170
170
specifies the maximum wait time in seconds before returning. A negative
171
171
*timeout * argument specifies an unbounded wait. You cannot specify
172
- a *timeout * if *waitflag * is zero .
172
+ a *timeout * if *blocking * is False .
173
173
174
174
The return value is ``True `` if the lock is acquired successfully,
175
175
``False `` if not.
0 commit comments