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
Re: [Caml-list] STM support in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-03-08 (23:56)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] STM support in OCaml
On Wed, 2006-03-08 at 23:02 +0000, Asfand Yar Qazi wrote:

> To tell the truth, I just want to be on the bleeding edge - hence my desire to 
> get away from this horrid imperative programming I've been indoctrinated with, 
> and to learn how to get the most out of tomorrows processors, which will all 
> be multi-core.

hehe .. but procedural programming IS the bleeding edge now.

> (according to Tim Sweeny anyway) STM allows writing 
> multithreaded apps "almost as easily as single threaded ones", so would be the 
> solution to the headaches one normally associates with concurrent programming.

Yes, I tend to feel this is so, because it provides composition.
Another way of doing this is to use channels. As a programmer
I'd like a choice of techniques .. so I'd like both (and locks
as well .. just in case. I still use 'goto' :)

You can try out channels in Ocaml, see the Event module.
This is also 'lock free' in the sense the programmer
writes no locks. You also have composition, but a different
kind to STM (in fact, almost looks like they're dual/control

John Skaller <skaller at users dot sourceforge dot net>
Async PL, Realtime software consultants
Checkout Felix: