On 3/1/07, Mike Verdone <[EMAIL PROTECTED]> wrote:
> When write is called check if the buffer is bigger than buffer_size.
> If it is attempt to pre-flush the buffer. If we can't pre-flush, raise
> BlockingIO error.

I'd much rather see dynamically-sized buffers.  If it works as you
describe, then any application that wants to use reliable [1]
non-blocking I/O is going to have keep its own buffer of data waiting
to be written to the Buffered IO object.  That's a pain and needlessly
redundant.

One could just set the buffer "large enough" for the applications
current needs, but this can lead to strange failures later when the
application needs to hold buffer_size+1 bytes in the buffer and
suddenly dies.

[1] = "reliable" in the sense of "no data loss unless the connection drops"

-- 
Daniel Stutzbach, Ph.D.             President, Stutzbach Enterprises LLC
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to