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 (07:41)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] Re: Kinds of threads

Michaël Grünewald wrote:
> 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
> 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).

I don't really know what you mean by "emulation", but, yes, 
LinuxThreads is POSIX-compliant extension to glibc which 
instantiates kernel-level processes.

> 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.

Caml threads are probably the only way to go on Windows, 
since the Win32 API is not POSIX compliant.

Still, this does not answer my question: what is the 
threading style chosen for the official RPM distribution of 
O'Caml? Let me see if I can figure this out by myself...


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: