Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Patrick M Doane <patrick@watson.org>
To: Nicolas GEORGE <nicolas.george@ens.fr>
Cc: Caml mailing list <caml-list@inria.fr>
Subject: Re: [Caml-list] Library using blocking Unix functions
Date: Sun, 24 Jun 2001 17:08:47 -0400 (EDT)	[thread overview]
Message-ID: <Pine.BSF.3.96.1010624170601.68472A-100000@fledge.watson.org> (raw)
In-Reply-To: <20010624212751.A17637@clipper.ens.fr>

Hello,

If it is reasonable for you to use version 3.01, then I think your problem
is solved.  Here is an excerpt from the manual for the ThreadUnix module:

  This module is deprecated: its functionality has been merged back into
  the Unix module. Threaded programs can now call the functions from
  module Unix directly, and still get the correct behavior (block the
  calling thread, if required, but do not block all threads in the
  process). 

Patrick Doane

On Sun, 24 Jun 2001, Nicolas GEORGE wrote: 

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

-------------------
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 21:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-24 19:27 Nicolas GEORGE
2001-06-24 21:08 ` Patrick M Doane [this message]
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=Pine.BSF.3.96.1010624170601.68472A-100000@fledge.watson.org \
    --to=patrick@watson.org \
    --cc=caml-list@inria.fr \
    --cc=nicolas.george@ens.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