Skip to content

Commit 819ef07

Browse files
davispihnorton
authored andcommitted
Release the GIL while consolidating
I stumbled over this while attempting to log stats during consolidation. Turns out when we don't release the gil the background thread can't run.
1 parent cd92151 commit 819ef07

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tiledb/cc/array.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,13 @@ void init_array(py::module &m) {
5656
.def("close", &Array::close)
5757
.def("consolidate",
5858
py::overload_cast<const Context &, const std::string &,
59-
Config *const>(&Array::consolidate))
59+
Config *const>(&Array::consolidate),
60+
py::call_guard<py::gil_scoped_release>())
6061
.def("consolidate",
6162
py::overload_cast<const Context &, const std::string &,
6263
tiledb_encryption_type_t, const std::string &,
63-
Config *const>(&Array::consolidate))
64+
Config *const>(&Array::consolidate),
65+
py::call_guard<py::gil_scoped_release>())
6466
//(void (Array::*)(const Context&, const std::string&,
6567
// tiledb_encryption_type_t, const std::string&,
6668
// Config* const)&Array::consolidate)&Array::consolidate)

0 commit comments

Comments
 (0)