Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Yamagata Yoriyuki <yoriyuki@mbg.ocn.ne.jp>
To: dmentre@linux-france.org
Cc: gerd@gerd-stolpmann.de, caml-list@inria.fr
Subject: Re: [Caml-list] Flush behavior of baseic I/O class type
Date: Sun, 17 Oct 2004 02:51:48 +0900 (JST)	[thread overview]
Message-ID: <20041017.025148.11606687.yoriyuki@mbg.ocn.ne.jp> (raw)
In-Reply-To: <87brf2tyrz.fsf@linux-france.org>

From: David MENTRE <dmentre@linux-france.org>
Subject: Re: [Caml-list] Flush behavior of baseic I/O class type
Date: Sat, 16 Oct 2004 18:26:24 +0200

> Yamagata Yoriyuki <yoriyuki@mbg.ocn.ne.jp> writes:
> 
> >   1) Output as far as possible, and leave the rest.
> >   2) raise an exception
> >   3) undefined.
> 
> Or  4) call blocked until the whole buffer can be flushed.

It may be ok for non-blocking I/O, but it will cause "busy-waiting" ,
so perhaps a user does not like it.  Moreover, for example, if the
channel is actually a filter, and it needs more inputs to determine
the next output, then it will stuck forever.  (See the case of the
multibyte charcter code converter in the previous mail)

The easiest way (from the implementer's point of the view) would be
1), or 1') do the best effort to output, but nothing is guaranteed.
However I'm afraid that it will cause a subtle I/O bug.

--
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


  reply	other threads:[~2004-10-16 18:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-16 15:52 Yamagata Yoriyuki
2004-10-16 16:26 ` David MENTRE
2004-10-16 17:51   ` Yamagata Yoriyuki [this message]
2004-10-16 19:40     ` Gerd Stolpmann
2004-10-16 20:16     ` John Prevost
2004-10-16 22:30 ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041017.025148.11606687.yoriyuki@mbg.ocn.ne.jp \
    --to=yoriyuki@mbg.ocn.ne.jp \
    --cc=caml-list@inria.fr \
    --cc=dmentre@linux-france.org \
    --cc=gerd@gerd-stolpmann.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox