mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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. Because of this change, a couple extension modules compiled for 3.2.4 (those which use the trashcan mechanism, despite it being undocumented) will not be loadable by 3.2.3 and earlier. However, extension modules compiled for 3.2.3 and earlier will be loadable by 3.2.4.
This commit is contained in:
parent
1d857453b7
commit
56cd62c04a
7 changed files with 140 additions and 9 deletions
|
@ -113,6 +113,9 @@ typedef struct _ts {
|
|||
PyObject *async_exc; /* Asynchronous exception to raise */
|
||||
long thread_id; /* Thread id where this tstate was created */
|
||||
|
||||
int trash_delete_nesting;
|
||||
PyObject *trash_delete_later;
|
||||
|
||||
/* XXX signal handlers should also be here */
|
||||
|
||||
} PyThreadState;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue