[Haskell-cafe] Re: Chameneos
Aaron Denney
wnoise at ofb.net
Fri Jan 6 06:36:23 EST 2006
On 2006-01-06, Chris Kuklewicz <haskell at list.mightyreason.com> wrote:
> http://www.haskell.org/hawiki/ChameneosEntry
I note that
# Like the erlang entry, this uses a separate thread to match up two
# chameneos in the meeting room.
Which seems to me to be against the spirit of the benchmark, which
describes itself as a "symmetrical thread rendez-vous". Having this
manager thread makes it assymetrical. Yes, the Erlang entry does it
(and it does appear to be the totally idiomatic way to do this, as one
of the common things to do is model persistent objects as processes),
but that doesn't necessarily mean that it is "right" to do so.
I think the intent is to have something like the Java model where
each thread calls some function to do the rendezvous and synchronize and
do wakeups on shared data -- essentially move what the manager thread
does into each color thread.
Note: I'm not saying that the seperate thread handling the rendezvous
data structure isn't a very good and clear approach to the problem, just
that it doesn't seem to be what the benchmark intended (unless built-in
to the concurrency primitives provided by the language or language
implementation).
--
Aaron Denney
-><-
More information about the Haskell-Cafe
mailing list