New PyGILState_ API - implements pep 311, from patch 684256.

This commit is contained in:
Mark Hammond 2003-04-19 15:41:53 +00:00
parent e36b690087
commit 8d98d2cb95
10 changed files with 395 additions and 131 deletions

View file

@ -321,6 +321,8 @@ PyEval_AcquireThread(PyThreadState *tstate)
{
if (tstate == NULL)
Py_FatalError("PyEval_AcquireThread: NULL new thread state");
/* Check someone has called PyEval_InitThreads() to create the lock */
assert(interpreter_lock);
PyThread_acquire_lock(interpreter_lock, 1);
if (PyThreadState_Swap(tstate) != NULL)
Py_FatalError(