Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment: The TextIOWrapper class is not thread-safe, because it calls [the equivalent of] self.buffer.write(self.pending_bytes) before clearing self.pending_bytes. Of course the write() function will release the GIL, and another thread may send the same pending_bytes again.
Patch is attached. Antoine, can you review it? (_pyio.TextIOWrapper does no buffering.) ---------- assignee: -> pitrou keywords: +needs review, patch nosy: +amaury.forgeotdarc, pitrou Added file: http://bugs.python.org/file14757/textiowrapper_write.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6750> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com