[Haskell-cafe] Re: Parallel executing of actions

Simon Marlow simonmarhaskell at gmail.com
Tue Apr 17 08:35:24 EDT 2007

Mitar wrote:
> Hi!
> On 4/16/07, Bertram Felgenhauer <bertram.felgenhauer at googlemail.com> wrote:
>> > Since all the threads block on a single MVar how do they run in
>> > parallel?
>> The idea is that before the threads block on the MVar, they run their
>> action x to completion.
> The rendering crashes. I will have to precompute the values in threads
> someway and then sequentially draw it? Any suggestion how to do that?

I'm guessing this is becuase of the thread-local state used by OpenGL, which is 
the reason we have forkOS.  All your OpenGL calls must be executed by the same 
Haskell thread, and it must be a bound thread (i.e. either the main thread, or a 
thread created with forkOS).


More information about the Haskell-Cafe mailing list