Skip to content

Commit 0427239

Browse files
hanbin973mergify[bot]
authored andcommitted
add GIL release for statistics
1 parent ffecae9 commit 0427239

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

python/_tskitmodule.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9715,9 +9715,11 @@ TreeSequence_weighted_stat_vector_method(
97159715
if (result_array == NULL) {
97169716
goto out;
97179717
}
9718+
Py_BEGIN_ALLOW_THREADS
97189719
err = method(self->tree_sequence, w_shape[1], PyArray_DATA(weights_array),
97199720
num_windows, PyArray_DATA(windows_array), num_focal_nodes,
97209721
PyArray_DATA(focal_nodes_array), PyArray_DATA(result_array), options);
9722+
Py_END_ALLOW_THREADS
97219723
if (err != 0) {
97229724
handle_library_error(err);
97239725
goto out;

0 commit comments

Comments
 (0)