[Haskell-cafe] STM interfacing with GLFW
krajcevski at gmail.com
Sat Dec 7 22:33:55 UTC 2013
Turns out this was a bug from removing the GLFW.pollEvents call, rather
than anything having to do with STM. Sorry for the spam!
On Sat, Dec 7, 2013 at 4:35 PM, Pavel Krajcevski <krajcevski at gmail.com>wrote:
> I'm new to STM and to Haskell in general. I've been writing a small
> library to try some graphics algorithms in Haskell, but using GLFW's
> callbacks seems to be causing me problems. I have a (relatively
> heavyweight?) object wrapped in a TVar (Data.Set) that I'm sharing across
> all threads.
> Unfortunately, once I run the program, it becomes unresponsive although
> the main loop is still running. I'm not sure exactly what the semantics are
> for getting STM right, but ideally I'm trying to modify the TVar in GLFW
> event callbacks and then finally read out the value of the TVar at the end
> (or beginning) of my rendering loop. I've been able to get a small program
> working that reproduces my problem:
> Any help would be great!
> - Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe