Skip to content

Commit 0d1cd10

Browse files
committed
Unblock threads at the earliest possible convenience
1 parent 59620fa commit 0d1cd10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/isal/isal_zlibmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,13 @@ ParallelCompress_compress_and_crc(ParallelCompress *self,
401401
"Can only compress %d bytes of data", UINT32_MAX);
402402
goto error;
403403
}
404+
PyThreadState *_save;
405+
Py_UNBLOCK_THREADS
404406
isal_deflate_reset(&self->zst);
405407
self->zst.avail_in = data.len;
406408
self->zst.next_in = data.buf;
407409
self->zst.next_out = self->buffer;
408410
self->zst.avail_out = self->buffer_size;
409-
PyThreadState *_save;
410-
Py_UNBLOCK_THREADS
411411
int err = isal_deflate_set_dict(&self->zst, zdict.buf, zdict.len);
412412
if (err != 0){
413413
Py_BLOCK_THREADS;

0 commit comments

Comments
 (0)