diff options
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index b055d61..d4c15f3 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -193,7 +193,8 @@ static void ensure_tstate_not_null(const char *func, PyThreadState *tstate) { if (tstate == NULL) { - _Py_FatalErrorFunc(func, "current thread state is NULL"); + _Py_FatalErrorFunc(func, + "current thread state is NULL (released GIL?)"); } } @@ -314,6 +315,13 @@ PyEval_ReleaseLock(void) } void +_PyEval_ReleaseLock(PyThreadState *tstate) +{ + struct _ceval_runtime_state *ceval = &tstate->interp->runtime->ceval; + drop_gil(ceval, tstate); +} + +void PyEval_AcquireThread(PyThreadState *tstate) { ensure_tstate_not_null(__func__, tstate); |