Browse thread
effect of -thread with ocamlc/ocamlopt -c
[
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: | 2006-09-13 (16:57) |
From: | Trevor Jim <trevor@r...> |
Subject: | Re: [Caml-list] effect of -thread with ocamlc/ocamlopt -c |
Thanks! I hope that the manual can incorporate this clarification. -Trevor Jacques Garrigue wrote: > The question is a bit different depending on whether you use system > threads or vmthreads. Note that if your platform supports system > threads, they are the ones used with the -thread option, while on > platforms without them -thread and -vmthread are equivalent. > > For system threads, the standard library is unchanged, and you don't > need the -thread option for modules that don't use threads. So there > is no problem. > > For vm threads, some modules from the standard library have different > implementations (namely, Pervasives, Marshal and Unix). So it is > essential that you use the -thread option to link with them. Note > however that the interfaces being identical, again you don't need > -thread for unrelated modules, so that in practice you shouldn't see > any difference with system threads. IIRC, at some point in the past > some modified functions were defined as external in the standard > library, making interfaces different, so that using -thread everywhere > was a strict requirement. > > Jacques Garrigue