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
[Caml-list] Kinds of threads
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-01 (06:53)
From: Michaël_Grünewald <michael-grunewald@w...>
Subject: [Caml-list] Re: Kinds of threads
Alessandro Baretta <> writes:

> The docs say that there are two kinds of threads in O'Caml: Ocaml
> bytecode threads and POSIX threads, and that it is possible to select
> which implementation to use at compiler build time. Two questions:
> first, what is the implementation chosen in the ocaml RPM distribution;
> second, why must one choose one implementation at compiler build time?
> Why not use a compiler switch such as --posix-threads as opposed to
> --caml-threads?

Depending of the platform, POSIX threads may not or badly
available. Emulation can be set up, either by coercing existing thread
capabilities to the POSIX interface, or by implementing a POSIX thread
library, using processes and interprocesses communications to do the job (i
have been told it was the way with linux, please confirm or infirm it).

Maybe the switch is here because it is better to use POSIX threads when they
are well supported by the system (e.g. BSDs); but the caml thread emulation
may give better results in (some) other cases.
Michaël Grünewald <>  - RSA PGP Key ID: 0x20D90C12
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: