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

Jim Jewett jimjjewett at gmail.com
Wed Mar 7 17:14:18 CET 2007


On 3/6/07, Guido van Rossum <guido at python.org> wrote:
> I think maybe a useful simplification would be to support special
> return values to capture EWOULDBLOCK (or equivalent) in the raw I/O
> interface only.

That makes sense.

> 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.

Or are you concerned that if it might really be blocked forever, and
should say so at the first opportunity?

-jJ


More information about the Python-3000 mailing list