comparison Modules/_threadmodule.c @ 82004:b414b2dfd3d3 3.3

merge #17091: update docstring for _thread.Lock.acquire.
author R David Murray <rdmurray@bitdance.com>
date Mon, 04 Feb 2013 10:22:39 -0500
parents dfc7fd24983a 0cc51c04aa20
children a80abb179ba1
comparison
equal deleted inserted replaced
82001:c3f0a0c825f6 82004:b414b2dfd3d3
143 self->locked = 1; 143 self->locked = 1;
144 return PyBool_FromLong(r == PY_LOCK_ACQUIRED); 144 return PyBool_FromLong(r == PY_LOCK_ACQUIRED);
145 } 145 }
146 146
147 PyDoc_STRVAR(acquire_doc, 147 PyDoc_STRVAR(acquire_doc,
148 "acquire([wait]) -> None or bool\n\ 148 "acquire([wait]) -> bool\n\
149 (acquire_lock() is an obsolete synonym)\n\ 149 (acquire_lock() is an obsolete synonym)\n\
150 \n\ 150 \n\
151 Lock the lock. Without argument, this blocks if the lock is already\n\ 151 Lock the lock. Without argument, this blocks if the lock is already\n\
152 locked (even by the same thread), waiting for another thread to release\n\ 152 locked (even by the same thread), waiting for another thread to release\n\
153 the lock, and return None once the lock is acquired.\n\ 153 the lock, and return True once the lock is acquired.\n\
154 With an argument, this will only block if the argument is true,\n\ 154 With an argument, this will only block if the argument is true,\n\
155 and the return value reflects whether the lock is acquired.\n\ 155 and the return value reflects whether the lock is acquired.\n\
156 The blocking operation is interruptible."); 156 The blocking operation is interruptible.");
157 157
158 static PyObject * 158 static PyObject *