[Python-Dev] io.BufferedReader.peek() Behaviour in python3.1

Lucas P Melo lukepadawan at gmail.com
Fri Jun 19 13:29:43 CEST 2009


Greg Ewing wrote:
> That's exactly why I think the blocking version should
> keep reading until the requested number of bytes is
> available (or the buffer is full or EOF occurs).
Do you mean that the blocking version should keep waiting for new bytes 
until they show up?
This would not be acceptable, since the program would hang forever most 
of the time (no changes to the buffer would ever occur in this situation 
when there's only the main thread running).

Am I understanding this correctly:
* The blocking version would not do any raw reads.
* The non-blocking version would do.


More information about the Python-Dev mailing list