mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
New PyGILState_ API - implements pep 311, from patch 684256.
This commit is contained in:
parent
e36b690087
commit
8d98d2cb95
10 changed files with 395 additions and 131 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue