Martin v. Löwis <[EMAIL PROTECTED]> added the comment: I don't think the proposed patch (file11012) makes it thread-safe, and I believe you cannot get it thread-safe without using thread synchronization.
For example, if two threads simultaneously determine that there is still space left (len(b) <= free), they might both write to self._write_buf and self._write_end, and the last writer would win. (In case it isn't clear how this might happen: thread 1 exhausts its Py_Ticker just after checking the size, then thread 2 runs a full .write(), then thread 1 continues filling the buffer) ---------- nosy: +loewis _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3476> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com