[Haskell-cafe] Re: Waiting for thread to finish
Brian Sniffen
brian.sniffen at gmail.com
Wed Nov 28 17:18:22 EST 2007
On Nov 28, 2007 5:07 PM, Maurício <briqueabraque at yahoo.com> wrote:
> Sorry if I sound rude. I just saw a place for a
> small joke, and used it. Chris code is pretty
> elegant to what it is supposed to do. However,
> knowing if a thread has finished is just 1 bit of
> information. There's probably a reason why that
> would hurt performance, but I don't understand
> it.
Most threads either communicate some result---and you'll care about
setting up a channel for that---or run forever. Some threads run on
different computation engines. There's nothing in the Haskell spec
that says I have to run the threads on a shared-memory machine. If
the threads are distributed, then the channel to communicate back that
one has finished may be very expensive.
-Brian
--
Brian T. Sniffen
bts at alum.mit.edu or brian.sniffen at gmail.com
http://www.evenmere.org/~bts
More information about the Haskell-Cafe
mailing list