4

Has anyone used multi-threading safely in wxHaskell? I am trying to determine if a wxHaskell program could use multi cores to do background processing.

The link below explains how to do this safely in Gtk2Hs:

http://dmwit.com/gtk2hs/

The key seems to be to only make GUI library calls from the main thread, which is always OS-bound, so other threads will need to find a way to request the main thread to make a GUI library call for them, rather than do a direct GUI library call themselves. In Gtk2Hs this is done using postGUIAsync or postGUISync, but I have not found anything online on how to do this in wxHaskell.

Is there any equivalent postGUI in wxHaskell, or do I need to roll my own, assuming this is possible?

Also, if I follow the overall approached described above for Gtk2Hs multi-threading, would I be able to safely multi-thread in wxHaskell?

0 Answers0