Commit 4256a1a4 authored by Bobby Powers's avatar Bobby Powers Committed by Denis Bilenko

gevent_call: make sure to release the GIL

parent acd98e9d
......@@ -139,13 +139,13 @@ static void gevent_call(struct PyGeventLoopObject* loop, struct PyGeventCallback
PyObject *result, *callback, *args;
GIL_ENSURE;
if (!loop || !cb)
return;
goto end;
callback = cb->callback;
args = cb->args;
if (!callback || !args)
return;
goto end;
if (callback == Py_None || args == Py_None)
return;
goto end;
Py_INCREF(loop);
Py_INCREF(callback);
Py_INCREF(args);
......@@ -169,6 +169,7 @@ static void gevent_call(struct PyGeventLoopObject* loop, struct PyGeventCallback
Py_DECREF(callback);
Py_DECREF(args);
Py_DECREF(loop);
end:
GIL_RELEASE;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment