Skip to content

Commit ce36eef

Browse files
committed
Acquire the GIL in StreamableExecutor destructor
1 parent 08da7b9 commit ce36eef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pdal/StreamableExecutor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,10 @@ StreamableExecutor::~StreamableExecutor()
206206
if (!m_executed)
207207
{
208208
m_table.disable();
209+
auto gil = PyGILState_Ensure();
209210
while (PyArrayObject* arr = m_table.fetchArray())
210211
Py_XDECREF(arr);
212+
PyGILState_Release(gil);
211213
}
212214
Py_BEGIN_ALLOW_THREADS
213215
m_thread->join();

0 commit comments

Comments
 (0)