On 6/12/13 11:18 AM, Steven Schveighoffer wrote:
On Wed, 12 Jun 2013 02:48:44 -0400, Walter Bright
<newshou...@digitalmars.com> wrote:

On 6/11/2013 10:15 PM, deadalnix wrote:
On Wednesday, 12 June 2013 at 04:23:39 UTC, Walter Bright wrote:
I don't agree. Buffering is often done on page size boundaries -
throwing out
a random number of characters and then flushing will get it all wonky.

You clearly missed something in the discussion here. The proposal is
to flush
once at first use, so an Exception is thrown. Nothing change after
that first
flush at initialization, other flushes stay where they are.

Not at all. A flush forces a write to the disk - that's the point of
it. Disks are not at all well tuned to writing a few bytes, they like
to be written in aligned blocks of block sizes, and the I/O subsystem
is designed for that.

This is why stdout has a flag in it saying if it is a "block oriented"
or "character oriented" device. It makes a big difference. This
proposal attempts to treat a block device like a character device. It
will work, but it will perform poorly.

No, it does perform well. You are still not understanding the proposal.

I agree performance is not a problem. But it's just weird behavior. We should flush stdout termination, anything else would have to be carefully justified - and this is not.

Andrei


Reply via email to