mirror of
https://github.com/python/cpython.git
synced 2025-07-15 15:25:29 +00:00
Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator chains ran concurrently and involved subclasses of built-in container types. Note that the trashcan functions are part of the stable ABI, therefore they have to be kept around for binary compatibility of extensions.
This commit is contained in:
commit
5b4faae307
7 changed files with 140 additions and 9 deletions
|
@ -206,6 +206,9 @@ new_threadstate(PyInterpreterState *interp, int init)
|
|||
tstate->c_profileobj = NULL;
|
||||
tstate->c_traceobj = NULL;
|
||||
|
||||
tstate->trash_delete_nesting = 0;
|
||||
tstate->trash_delete_later = NULL;
|
||||
|
||||
if (init)
|
||||
_PyThreadState_Init(tstate);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue