[issue4804] Python on Windows disables all C runtime library assertions

Kristján Valur Jónsson report at bugs.python.org
Sun Feb 1 10:52:23 CET 2009


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

Ah, but I think you missed  the main point of the new patch.
There is a counter incremented and decremented.  So, the State is set 
only when the first thread enters a guarded section, and then restored 
when the final thread leaves the section.  There is no per-thread 
storage of the previous state anymore, only static variables storing 
the "unmodified state" to restore to when the last thread leaves a 
guarded section.  As long as some thread is in a guarded section, 
assertions and stuff is turned off, otherwise, we keep the old ones.

This is similar in some ways to the special version of 
Py_BEGIN_ALLOW_THREADS (FILE_BEGIN_ALLOW_THREADS, was it?) used in 
fileio.c.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4804>
_______________________________________


More information about the Python-bugs-list mailing list