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: | Xavier Leroy <xavier.leroy@i...> |
| Subject: | Re: [Caml-list] Re: Kinds of threads |
> 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 The RPMs distributed by INRIA use bytecode threads. That might not be true of RPMs and Debian packages built by third parties. > 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? Mostly because the idea didn't cross my mind. Offhand, I believe that just playing with the search path would suffice to select between the two implementations. (This needs to be checked, though.) > Caml threads are probably the only way to go on Windows, > since the Win32 API is not POSIX compliant. Amusingly, it's the other way around: bytecode threads use a lot of Unix-specific hacks to get non-blocking I/O, while system threads can easily be built on top of Win32 threads (even though the latter aren't POSIX-compliant). - 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