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 VAA21110; Sun, 24 Jun 2001 21:27:53 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA21106 for ; Sun, 24 Jun 2001 21:27:52 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f5OJRpn18417 for ; Sun, 24 Jun 2001 21:27:51 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id f5OJRpp55324 for ; Sun, 24 Jun 2001 21:27:51 +0200 (CEST) Received: from (george@localhost) by clipper.ens.fr (8.9.2/jb-1.1) Date: Sun, 24 Jun 2001 21:27:51 +0200 From: Nicolas GEORGE To: Caml mailing list Subject: [Caml-list] Library using blocking Unix functions Message-ID: <20010624212751.A17637@clipper.ens.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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