Lines Matching defs:lock
28 PyThread_type_lock lock;
54 if (self->lock != NULL) {
55 /* Unlock the lock so it's safe to free it */
57 PyThread_release_lock(self->lock);
58 PyThread_free_lock(self->lock);
92 self->lock = PyThread_allocate_lock();
94 if (self->lock == NULL) {
96 PyErr_SetString(PyExc_MemoryError, "can't allocate lock");
132 PyThread_release_lock(self->lock);
243 /* put() signals the queue to be non-empty by releasing the lock.
244 * So we simply try to acquire the lock in a loop, until the condition
249 r = PyThread_acquire_lock_timed(self->lock, 0, 0);
252 r = PyThread_acquire_lock_timed(self->lock, microseconds, 1);
280 PyThread_release_lock(self->lock);