Browse thread
[Caml-list] Why systhreads?
- Lauri Alanko
[
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: | Lauri Alanko <la@i...> |
| Subject: | [Caml-list] Why systhreads? |
Hello. A simple, fundamental question: why is native-code threading done using system threads? Why isn't pure user-level scheduling used as with bytecode? It seems that all the time incompatibilities and deficiencies in Win32 threads and pthreads cause no end of trouble, for instance they fail to support the asynchronous exceptions which I yearned for. Since there is a single heap and threads are run in a strictly serialized order, system threads don't even give any support for parallelism. So user-level threading seems like the sensible option. For instance, the GHC Haskell compiler uses pure user-level threading both in native code and when interpreted, and it works pretty well. (All right, there's now talk of adding systhread support, but only for foreign interface issues.) I cannot believe that supporting many different system thread interfaces is easier than managing native-code stacks manually. So could someone please clarify what the motivation here is? Thanks. Lauri Alanko la@iki.fi ------------------- 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