Endangered I/O operations

Sigbjorn Finne sof@galconn.com
Wed, 23 May 2001 10:44:17 -0700


Simon Marlow <simonmar@microsoft.com> writes:
>
 ....
> You obtain the ordering properties by setting the handle to NoBuffering,
> otherwise you get buffered input/output.  Wouldn't it be deviating from
> the report to do extra flushing in the buffered case?

The report is very silent about this, so I guess that reduces the question
to what the end-user would prefer, (a) go non-buffered or make sure you
call hFlush at the right time, or (b) have the IO implementation flush when
required. I prefer (b), which is why I implemented this at the time, as it
is
more useable (and more efficient to boot).

FWIW, notice that stdio implementations diverge on this issue too, all
Win32 impls I've seen does the flushing for you, as did earlier impls of
glibc, I seem to recall.

--sigbjorn