Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] The closing gap (warning: long, inflammatory rant)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Berke Durak <berke.durak@g...>
Subject: Re: [Caml-list] The closing gap (warning: long, inflammatory rant)
Richard Jones:
> Garbage collectors and _not_ using threads both improve the safety of the
language.

Arnaud Spiwack:

> This might depend on what kind of thread interface you are provided with.
> Of course it's never easy to work with non-determinism, but if I take jocaml
> for instance, which gives you a process (in the sense of pi-calculus)
> interface to threads, and it makes it probably rather safe actually,
> possibly stronger safety when dealing with multiple processes (or UI threads
> possibly) than doing things with low-level primitves like fork and such.
>

That's the point.  The conventional threading model (mutable shared data and
mutexland) is unsafe by default.  It's like the good old days of manual
memory management in C, except
that you replace malloc/free with pthread_mutex_lock/pthread_mutex_unlock
and
signal 11 by deadlocks.

But it's actually worse because mutexing doesn't compose as well as malloc.
This means that it's difficult to increase the abstraction level.
-- 
Berke