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
threads library in Objective Caml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1997-04-16 (11:58)
From: pcuoq@e...
Subject: Re: threads library in Objective Caml
I think that the part of the documentation you
refer to deals with the thread library of the
bytecode compiler, implemented by time-sharing
on the virtual machine.

There is however a thread library using Unix threads 
(in otherlibs/systhreads) but it has the same
bad behavior on multi-processor machines :
There is (almost everytime) only one caml thread
running.  This is ensured by a mutex shared among
caml threads.  The mutex is released only at safe
points of the execution.

In particular it is released each time that the
current thread could block.

This explains the behavior of caml programs on
MP machines.