From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CDD61BB81 for ; Fri, 16 Dec 2005 13:43:22 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jBGChMqW015629 for ; Fri, 16 Dec 2005 13:43:22 +0100 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 NAA22204 for ; Fri, 16 Dec 2005 13:43:21 +0100 (MET) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jBGChK2n015625 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 16 Dec 2005 13:43:21 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EnEtA-0005YT-9G for caml-list@inria.fr; Fri, 16 Dec 2005 13:40:44 +0100 Received: from host127-141.pool8251.interbusiness.it ([82.51.141.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Dec 2005 13:40:44 +0100 Received: from vincenzo_yahoo_addressguard-gmane by host127-141.pool8251.interbusiness.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Dec 2005 13:40:44 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Vincenzo Ciancia Subject: Re: Concurrent and Distributed Programming in Ocaml Date: Fri, 16 Dec 2005 13:40:30 +0100 Message-ID: References: <20051216115153.46672.qmail@web51613.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8Bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: host127-141.pool8251.interbusiness.it User-Agent: KNode/0.10 Sender: news X-Miltered: at concorde with ID 43A2B66A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43A2B668.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 threads:01 ocaml:01 abstraction:01 libref:01 attenzione:98 l'indirizzo:98 posta:98 nel:98 campo:98 wrote:01 simpler:01 modules:01 primitives:01 caml:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Alexsandro Soares wrote: > Our first try used the > primitives provided in modules Mutex and Condition to > do syncronization between process and threads [...] we > would like to use higher level constructs to work with > concurrent and distributed programming. What are the > options to do this in OCaml? I would recommend trying the Event module which features channels and events, which in turn are an abstraction which allows to build more complex events from simpler ones before "synchronizing" on the resulting event. For example, "receive a" is the event that, when you synchronize to it, waits for a value to be sent on channel "a", and returns the value, and "choose [receive a,receive b]" is the event that, when you synchronize to it, waits for a value to be sent on either "a" or "b" and returns the value - in this case a and b must have the same value type. http://caml.inria.fr/pub/docs/manual-ocaml/libref/Event.html Bye Vincenzo -- Please note that I do not read the e-mail address used in the from field but I read vincenzo_ml at yahoo dot it Attenzione: non leggo l'indirizzo di posta usato nel campo from, ma leggo vincenzo_ml at yahoo dot it