mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-126914: Store the Preallocated Thread State's Pointer in a PyInterpreterState Field (gh-126989)
This approach eliminates the originally reported race. It also gets rid of the deadlock reported in gh-96071, so we can remove the workaround added then.
This commit is contained in:
parent
824afbf548
commit
1c0a104eca
4 changed files with 84 additions and 50 deletions
|
@ -118,6 +118,9 @@ extern PyTypeObject _PyExc_MemoryError;
|
|||
{ \
|
||||
.id_refcount = -1, \
|
||||
._whence = _PyInterpreterState_WHENCE_NOTSET, \
|
||||
.threads = { \
|
||||
.preallocated = &(INTERP)._initial_thread, \
|
||||
}, \
|
||||
.imports = IMPORTS_INIT, \
|
||||
.ceval = { \
|
||||
.recursion_limit = Py_DEFAULT_RECURSION_LIMIT, \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue