消息 [70561]
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) |
|
| 日期 |
用户 |
动作 |
参数 |
| 2008-08-01 15:45:39 | loewis | 修改 | recipients:
+ loewis, amaury.forgeotdarc, pitrou, benjamin.peterson |
| 2008-08-01 15:45:39 | loewis | 修改 | messageid: <1217605539.5.0.942982690815.issue3476@psf.upfronthosting.co.za> |
| 2008-08-01 15:45:38 | loewis | 链接 | issue3476 messages |
| 2008-08-01 15:45:38 | loewis | 创建 | |
|