Explorar o código

starpupy: release/reacquire the GIL around starpu_shutdown()

HE Kun %!s(int64=4) %!d(string=hai) anos
pai
achega
d41f3c0aa8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      starpupy/src/starpu_task_wrapper.c

+ 2 - 0
starpupy/src/starpu_task_wrapper.c

@@ -663,7 +663,9 @@ static PyObject* starpu_task_nsubmitted_wrapper(PyObject *self, PyObject *args)
 static PyObject* starpu_shutdown_wrapper(PyObject *self, PyObject *args)
 {
 	/*call starpu_shutdown method*/
+	Py_BEGIN_ALLOW_THREADS
 	starpu_shutdown();
+	Py_END_ALLOW_THREADS
 
 	/*return type is void*/
 	Py_INCREF(Py_None);