
14 Dec
2012
14 Dec
'12
6:47 p.m.
Quoting Mario Pastorelli
forkIO $ do threadDelay(1 * 1000000) unmapWindow dpy win destroyWindow dpy win sync dpy False
Naively, this looks un-thread-safe to me. Only one thread is allowed to access a Display at a time; can you guarantee that the main xmonad-core thread won't be accessing dpy for some reason at the time this code runs? If not, you need to open a new display yourself in the forked thread. You might be okay by accident -- I don't think xmonad is typically linked with GHC's threaded runtime -- but I'm not sure it's a good idea to rely on that staying true in the future. ~d