
2 Sep
2006
2 Sep
'06
3 a.m.
Hello Neil, Friday, September 1, 2006, 6:47:12 PM, you wrote:
I have no idea about wxHaskell and STM, but I found out that hard way that Gtk2Hs + threads = bad idea.
Duncan Coutts, gtk2hs author, writes the same and proposed solution - use dedicated thread to execute all graphics commands and send these commands to the thread using Chan. it's just several lines of code: c <- newChan forkOS (graphicsThread c) writeChan c (drawCircle ...) graphicsThread c = forever $ do cmd <- readChan c cmd Just mention that forkOS, but not forkIO, should be used. one my friend tried this setting and it worked fine -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com