Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Flush behavior of baseic I/O class type
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-10-16 (15:53)
From: Yamagata Yoriyuki <yoriyuki@m...>
Subject: [Caml-list] Flush behavior of baseic I/O class type

In, flush method
is defined as "The implementation may choose that put does not write
directly to the underlying resource, but into a buffer. In this case,
the call of flush writes the contents of the buffer to the
resource. When there is no such buffer, the call does nothing."

However if flush cannot output the whole buffer, what should it do?
The underlying output channel could be blocked, or the channel is code
converter and flush is called in the middle of the multibyte

I think three possibility.
  1) Output as far as possible, and leave the rest.
  2) raise an exception
  3) undefined.

What is your opinion?

Yamagata Yoriyuki

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: