From: Eric Y. K. <eri...@gm...> - 2011-09-02 14:21:28
|
On Fri, Sep 02, 2011 at 15:03:28 +0100, mac...@gm... wrote: > There is indeed a claim in wxHaskell FAQ that it is incompatible with > Haskell threads. I have, however, used threads spawned with forkIO to > update wxHaskell GUI in toy apps, without any ill effects. Examples: > > http://mmakowski.com/wiki/tech:haskell_mvc > https://github.com/mmakowski/habaz > > I'd be interested to learn how the incompatibility can manifest itself > -- if there indeed is any. It's worth noting this entry from the wxWidgets FAQ: wxWidgets (like most GUI toolkits underneath it) is not thread-safe, and handling of GUI components should always be done exclusively in the main thread. This doesn't stop you from doing the non-GUI stuff in other threads though. Was interested to see that the wxHaskell mutable var is just a TVar (from STM?) -- Eric Kow <http://erickow.com> |