Lines Matching defs:lock
75 PyThread_type_lock lock;
88 newobj->lock = NULL;
179 if (self->lock) {
180 PyThread_free_lock(self->lock);
288 if (self->lock == NULL && buf.len >= HASHLIB_GIL_MINSIZE) {
289 self->lock = PyThread_allocate_lock();
291 /* Once a lock exists all code paths must be synchronized. We have to
292 * release the GIL even for small buffers as acquiring the lock may take
295 if (self->lock) {
297 PyThread_acquire_lock(self->lock, 1);
299 PyThread_release_lock(self->lock);