summaryrefslogtreecommitdiffstats
path: root/Include/pystate.h
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-09-05 22:59:49 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-09-05 22:59:49 (GMT)
commit2b0218a259083f7124087037bc0ca7338790b6d3 (patch)
tree70a903c9e401215c8fa93ff00626585e1d6937c1 /Include/pystate.h
parentef06595535fcb7f4b693f44c568be33b75c1ff06 (diff)
downloadcpython-2b0218a259083f7124087037bc0ca7338790b6d3.zip
cpython-2b0218a259083f7124087037bc0ca7338790b6d3.tar.gz
cpython-2b0218a259083f7124087037bc0ca7338790b6d3.tar.bz2
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.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r--Include/pystate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index 25c2faa..2017b02 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -114,6 +114,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;