[Haskell-cafe] Re: Waiting for thread to finish
brad at bjclow.org
Tue Nov 27 20:47:28 EST 2007
On Nov 28, 2007 11:30 AM, Matthew Brecknell <haskell at brecknell.org> wrote:
> Even with threads, results are evaluated only when they are needed (or
> when forced by a strictness annotation). So the thread that needs a
> result (or forces it) first will be the one to evaluate it.
So does GHC implement some sychronisation given that a mutation is
occuring under the covers, ie. the thunk is being replaced by the
> Did you see Don's strict-concurrency announcement yesterday?
Yes. I am using a TVar to build results of forked functions in. I had
a quick go at changing to channels so I could use Dons library but
kept getting blocking exceptions, so I have left it as is for the
Recycle is good: Reuse is better
More information about the Haskell-Cafe