Browse thread
[ANN] coThreads 0.10
[
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: | 2007-09-17 (23:26) |
From: | skaller <skaller@u...> |
Subject: | Re: [Caml-list] Re: [ANN] coThreads 0.10 |
On Tue, 2007-09-18 at 00:37 +0200, Zheng Li wrote: > For immutable value, it's not different from the traditional threads, at least > from the library users' point of view: if a variable is already inside the > scope of a threads (i.e. it's global and created before launching the thread), > there is no necessity to message passing it; if not, you should anyway do it > explicitly even with the traditional threads. Yes, however such a value can't be shared by parallel control paths (in ocaml) because the collector won't allow it. Of course you can *copy* it eg with fork() and run separate collectors. Then the functional value is the same, but the object identity (machine address) may differ. BTW: an interesting application would be to adapt GLR parser to actually use multi-core CPU to speed up parsing by spawning alternate parses as parallel control streams. -- John Skaller <skaller at users dot sf dot net> Felix, successor to C++: http://felix.sf.net