caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Nicolas GEORGE <nicolas.george@ens.fr>
To: Caml mailing list <caml-list@inria.fr>
Subject: [Caml-list] Library using blocking Unix functions
Date: Sun, 24 Jun 2001 21:27:51 +0200	[thread overview]
Message-ID: <20010624212751.A17637@clipper.ens.fr> (raw)

I am trying to write a small library that needs blocking functions. And I
have a problem with these: they exist in Unix and ThreadUnix. This is not a
problem for a self-contained application, where one know if it is threaded
or not (even there, switching from non-threaded to threaded may cause
errors). But this means that the same library can not be used in both
cases.

One solution could be for _every_ module in the library to be a functor in
term of an ThreadUnix-like module, but I find that hevay and inelegant.

Something more elegant would be, I think, to have a unique module, let us
say BlockingUnix, with two implementations, one in the standard directory,
and another in the directory with the threaded library, that have exactly
the same interface (the .cmi should have the same md5 sum).

I wonder what people here think about this.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


             reply	other threads:[~2001-06-24 19:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-24 19:27 Nicolas GEORGE [this message]
2001-06-24 21:08 ` Patrick M Doane
2001-06-24 21:16   ` Nicolas George
2001-06-25  7:17   ` Xavier Leroy

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=20010624212751.A17637@clipper.ens.fr \
    --to=nicolas.george@ens.fr \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).