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