Skip to content

Commit 908d1b6

Browse files
Will-Tylerjeromekelleher
authored andcommitted
Release GIL while encoding VCF
1 parent 53742a3 commit 908d1b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vcztools/_vcztoolsmodule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,8 +462,10 @@ VcfEncoder_encode(VcfEncoder *self, PyObject *args)
462462
PyErr_NoMemory();
463463
goto out;
464464
}
465+
Py_BEGIN_ALLOW_THREADS
465466
line_length = vcz_variant_encoder_encode(
466467
self->vcf_encoder, (size_t) row, buf, (size_t) bufsize);
468+
Py_END_ALLOW_THREADS
467469
if (line_length < 0) {
468470
handle_library_error((int) line_length);
469471
goto out;

0 commit comments

Comments
 (0)