Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2005-12-16 (13:28)
From: David Teller <David.Teller@e...>
Subject: Re: [Caml-list] Re: Concurrent and Distributed Programming in Ocaml
While this module is absolutely great, it suffers from OCaml's
limitation that multi-threaded code runs only one one processor, even if
several are available.

For concurrency, I would suggest taking a look at Acute, but that's
quite low-level, when compared to JoCaml. Basically, the communication
primitives are similar to a somewhat lower-level version of the Event
module. I don't know whether there is a native code compiler, though.


On Fri, 2005-12-16 at 13:40 +0100, Vincenzo Ciancia wrote:
> 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.
> Bye
> Vincenzo
Read, write and publish e-books,
 Free software, Open standards, Open source,
  The OpenBerg project --