[xmonad] Visual hints for XMonad actions
wagnerdm at seas.upenn.edu
wagnerdm at seas.upenn.edu
Sat Dec 15 00:47:16 CET 2012
Quoting Mario Pastorelli <pastorelli.mario at gmail.com>:
> 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
More information about the xmonad
mailing list