Browse thread
[Caml-list] Using threads in compiled code
[
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: | Xavier Leroy <xavier.leroy@i...> |
| Subject: | Re: [Caml-list] Using threads in compiled code |
> I'm writing a commercial application in O'Caml. We > need to run on all the main platforms (Linux, Windows > and Mac) and we'd like to use the native code compiler > and threads. > > My first question: does O'Caml support threads in > compiled code in all the above platforms? Linux: yes. Windows: yes. Mac: not yet by lack of (full) POSIX threads, but it is likely that future versions of MacOS X will have it. > My second question: how do I get threads to work? I'm > currently developing on Linux and there is no > threads.cmxa in my /usr/lib/ocaml (3.04 via Debian). > The O'Caml book suggests I need to download and > compile my own ocamlopt including pthreads support. > Is this correct? Yes. There is a configuration-time choice between bytecode-only threads and system threads (pthreads). Depending on what the author of the OCaml package chose, you may have to recompile from sources and select system threads. > What do I do for Windows? Nothing! The Windows port of OCaml uses system (Win32) threads, both in bytecode and native-code. Keep us informed with your commercial application. - Xavier Leroy ------------------- 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