IIRC, there are already type systems which may prevent deadlocks in
pi-calculus. And since pi-calculus is essentially the base for
CML/OCaml's Event/lwt (I'm not 100% sure for lwt), my guess is that it
shouldn't be too hard to get them to work for purely functional threaded
code. The missing step would be to detect whether code is purely
functional, which is a rather easy task (if tedious). 

The alternative to that missing step would be to detect whether
impurities are localized to each thread -- something which I believe
would also be quite feasible, provided you limit side-effects to the use
of a well-defined, thread-local, API.

Cheers,
 David


On Tue, 2008-05-20 at 00:24 +0200, Berke Durak wrote:
> Given that shared, mutable global state accessed with multiple threads
> is a recipe for bugs that no amount of data hiding can solve (because
> -locking-sections-don't-compose-),
> did anyone invent and implement a usable type or other system for
> making concurrency
> and parallelism safe?
> 
> If the answer is STM, please show me some non-trivial application that
> uses it, preferably
> in an impure language.
-- 
David Teller
 Security of Distributed Systems
  http://www.univ-orleans.fr/lifo/Members/David.Teller
 Angry researcher: French Universities need reforms, but the LRU act
brings liquidations. 

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to