Lines Matching defs:lock
220 PyThread_type_lock lock;
268 st = PyThread_acquire_lock(self->lock, 1);
271 * threads abruptly shut down while they owned the lock.
276 st = PyThread_acquire_lock_timed(self->lock, (PY_TIMEOUT_T)1e6, 0);
282 "could not acquire lock for %s at interpreter "
290 ( (PyThread_acquire_lock(self->lock, 0) ? \
297 PyThread_release_lock(self->lock); \
381 if (self->lock) {
382 PyThread_free_lock(self->lock);
383 self->lock = NULL;
496 /* flush() will most probably re-take the lock, so drop it first */
723 if (self->lock)
724 PyThread_free_lock(self->lock);
725 self->lock = PyThread_allocate_lock();
726 if (self->lock == NULL) {
727 PyErr_SetString(PyExc_RuntimeError, "can't allocate read lock");
1242 lock in this fast path.
1920 /* Issue #31976: Check for closed file after acquiring the lock. Another
1921 thread could be holding the lock while closing the file. */