[Python-3000] Non-blocking I/O? (Draft PEP for New IO system) (original) (raw)

Daniel Stutzbach daniel at stutzbachenterprises.com
Wed Mar 7 17:32:21 CET 2007


On 3/7/07, Jim Jewett <jimjjewett at gmail.com> wrote:

> The buffering layer could then raise IOError (or perhaps a special > subclass of it) if the raw I/O layer ever returned one of these;

Is this a "could", or "should"? I would expect the buffering layer (particularly output) to use its buffer, and to appear blocking (through sleep-and-retry) when that isn't enough.

If programmer has wrapped a non-blocking object with a buffer to give it blocking behavior, I think this is a programming error and Python should treat as such, not work around it so that the problem is harder to detect.

An object only becomes non-blocking if the program explicitly makes it non-blocking via fcntl.

-- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC



More information about the Python-3000 mailing list