On Wed, Mar 20, 2013 at 9:02 AM, Jesper Särnesjö
This solution seems to work perfectly for me. Since the foreign code is allowed to run uninterrupted, the GPU switch happens, and since the GUI actions stay on the main thread, the program's window responds to keyboard and mouse input correctly.
If that's correct, then I think you have found a bug in the GHC runtime: my understanding is that the timers should be disabled while foreign code is running, specifically to avoid confusing code that has no clue that there is another runtime involved. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net