Browse thread
[Caml-list] Flush behavior of baseic I/O class type
- Yamagata Yoriyuki
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Yamagata Yoriyuki <yoriyuki@m...> |
| Subject: | [Caml-list] Flush behavior of baseic I/O class type |
Hi, In http://www.ocaml-programming.de/rec/IO-Classes.html, 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 character. 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 caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners