Mark Hammond <mhamm...@users.sourceforge.net> added the comment: I believe your new patch suffers the same problem. Consider the blocks like:
+ /* turn off crt asserts on windows since we have no control over fd */ + Py_BEGIN_CRT_ERROR_HANDLING Py_BEGIN_ALLOW_THREADS size = write(fd, pbuf.buf, (size_t)pbuf.len); Py_END_ALLOW_THREADS + Py_END_CRT_ERROR_HANDLING And consider Martin's comments in msg80191: Here you have T1 setting a global mode, then releasing the GIL. Other threads are then free to run and may do the same and depending on the order the threads do things, the global setting may not end up where it started. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue4804> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com