Version française
Home     About     Download     Resources     Contact us    
Browse thread
Concurrent and Distributed Programming in Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Vincenzo Ciancia <vincenzo_yahoo_addressguard-gmane@y...>
Subject: Re: Concurrent and Distributed Programming in Ocaml
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