This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | alexandre.vassalotti |
|---|---|
| Recipients | alexandre.vassalotti, gregory.p.smith, loewis, pitrou |
| Date | 2008年07月23日.03:02:27 |
| SpamBayes Score | 0.00016460361 |
| Marked as misclassified | No |
| Message-id | <1216782150.94.0.927313067142.issue2523@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Antoine wrote: > Le lundi 21 juillet 2008 à 21:18 +0000, Martin v. Löwis a écrit : > > IIUC, a read of the full requested size would achieve exactly that: on a > > non-blocking stream (IIUC), a read will always return > > min(bytes_available, bytes_requested). > > Hmm, it seems logical indeed... Alexandre, do you have other information > on the subject? Martin is right. However, I don't how Python handle the case where bytes_available is zero (in C, an error value is returned and errno is set to EWOULDBLOCK). When I revised the patch I had a weak understanding of nonblocking I/O. I thought the "exponential" reads were for nonblocking I/O, but I see now that is non-sense. I am not sure, but I think Martin is also right about the second loop. The max() call should be changed back to "max(self.buffer_size, n))", like in the 2nd patch. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年07月23日 03:02:31 | alexandre.vassalotti | set | spambayes_score: 0.000164604 -> 0.00016460361 recipients: + alexandre.vassalotti, loewis, gregory.p.smith, pitrou |
| 2008年07月23日 03:02:31 | alexandre.vassalotti | set | spambayes_score: 0.000164604 -> 0.000164604 messageid: <1216782150.94.0.927313067142.issue2523@psf.upfronthosting.co.za> |
| 2008年07月23日 03:02:30 | alexandre.vassalotti | link | issue2523 messages |
| 2008年07月23日 03:02:28 | alexandre.vassalotti | create | |