Browse thread
[Caml-list] Kinds of threads
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Michaël_Grünewald <michael-grunewald@w...> |
| Subject: | [Caml-list] Re: Kinds of threads |
Alessandro Baretta <alex@baretta.com> 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 <michael-grunewald@wanadoo.fr> - RSA PGP Key ID: 0x20D90C12 ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners