From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA21871; Sun, 24 Jun 2001 23:09:17 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA21863 for ; Sun, 24 Jun 2001 23:09:16 +0200 (MET DST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f5OL9Ff24095 for ; Sun, 24 Jun 2001 23:09:15 +0200 (MET DST) Received: from localhost (patrick@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f5OL8lF74990; Sun, 24 Jun 2001 17:08:47 -0400 (EDT) (envelope-from patrick@watson.org) Date: Sun, 24 Jun 2001 17:08:47 -0400 (EDT) From: Patrick M Doane To: Nicolas GEORGE cc: Caml mailing list Subject: Re: [Caml-list] Library using blocking Unix functions In-Reply-To: <20010624212751.A17637@clipper.ens.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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