On Thu, 2009-09-24 at 00:10 +0200, Günther Schmidt wrote:
Hi Duncan,
so ... I have a green light to call gtk from within a forkIO thread for as long as I make sure that the rts is single threaded?
Yes and that works very nicely (with the cooperative scheduling trick described in the gtk2hs FAQ).
BTW: I was already strongly put off using unsafeInitGUIwForThreadedRTS but thanks for the warning.
Thus my back to my original question: Can I start either ghci or runghc with a single-threaded rts so I don't have to compile the app every time I want to check my really trick GUI code?
No. The ghc binary itself (ghc, runghc, ghci) is linked using the threaded runtime system. That's a link-time choice, there's no way to turn it on/off at the command line (that might change in future with shared libs). Duncan