Message71149
| Author |
loewis |
| Recipients |
amaury.forgeotdarc, benjamin.peterson, loewis, pitrou |
| Date |
2008年08月14日.20:08:27 |
| SpamBayes Score |
2.4354501e-06 |
| Marked as misclassified |
No |
| Message-id |
<1218744509.03.0.845959818982.issue3476@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The patch looks fine (as far as it goes).
I do think the same should be done to the reader: IO libraries typically
provide a promise that concurrent threads can read, and will get the
complete stream in an overlapped manner (i.e. each input byte goes to
exactly one thread - no input byte gets lost, and no input byte is
delivered to multiple threads). I don't think this is currently the
case: two threads reading simultaneously may very well read the same
bytes twice, and then, subsequently, skip bytes (i.e. when both
increment _read_pos, but both see the original value of pos) |
|