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
Faking concurrency using Unix forks and pipes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-30 (08:40)
From: luc.maranget@i...
Subject: Re: [Caml-list] Faking concurrency using Unix forks and pipes
> Has anyone implemented a parallel map function in OCaml using Unix forks, 
> pipes and maybe marshalling?
> This seems like an easy way to get concurrency in OCaml...
> -- 
> Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> OCaml for Scientists

This is what we did for a a few examples of using JoCaml,
the soon-to-be-released extension of OCaml for concurrent programming.

Fork/Exec is an easy way to get simultaneous execution.

JoCaml is not released yet, (I am writting the doc
and web site at the moment).

The much incomplete web site is at

One example of fork under jocaml control

The example may not meet all your concerns (speed I guess),
but you can replace the shell in the example by somme
C or Ocaml program that computes something and refine the control
to collect results.

Hope it helps.

Luc Maranget