caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Vincenzo Ciancia <vincenzo_yahoo_addressguard-gmane@yahoo.it>
To: caml-list@inria.fr
Subject: Re: Concurrent and Distributed Programming in Ocaml
Date: Fri, 16 Dec 2005 13:40:30 +0100	[thread overview]
Message-ID: <dnucib$sv8$1@sea.gmane.org> (raw)
In-Reply-To: <20051216115153.46672.qmail@web51613.mail.yahoo.com>

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


  reply	other threads:[~2005-12-16 12:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-16 11:51 Alexsandro Soares
2005-12-16 12:40 ` Vincenzo Ciancia [this message]
2005-12-16 13:28   ` [Caml-list] " David Teller

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='dnucib$sv8$1@sea.gmane.org' \
    --to=vincenzo_yahoo_addressguard-gmane@yahoo.it \
    --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).