summaryrefslogtreecommitdiffhomepage
path: root/Xmobar.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-17 19:13:07 +0200
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2007-07-17 19:13:07 +0200
commitd119a36b71c03e4fa13651a2153cd9a0ad460e3a (patch)
tree93a1ed2330b9c6896f8c0927cb33b33543585c21 /Xmobar.hs
parent8dc98a46708cc3bf6bd0ff642da37e3514ce5fba (diff)
downloadxmobar-d119a36b71c03e4fa13651a2153cd9a0ad460e3a.tar.gz
xmobar-d119a36b71c03e4fa13651a2153cd9a0ad460e3a.tar.bz2
threads are now started with forkOS
This is required by the fact that calling nextEvent will block all other running threads. So we need forkOS, which requires the -threaded ghc flag darcs-hash:20070717171307-d6583-b102fecf51ee4c275f448644c0d2b0fe15fa0062.gz
Diffstat (limited to 'Xmobar.hs')
-rw-r--r--Xmobar.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xmobar.hs b/Xmobar.hs
index 4cf53b3..6e598d7 100644
--- a/Xmobar.hs
+++ b/Xmobar.hs
@@ -80,7 +80,7 @@ eventLoop :: Xbar ()
eventLoop =
do c <- ask
s <- get
- io $ forkIO $ sendUpdateEvent (display s) (window s) (refresh c)
+ io $ forkOS $ sendUpdateEvent (display s) (window s) (refresh c)
io $ allocaXEvent $ \e ->
nextEvent (display s) e
updateWin
@@ -194,7 +194,7 @@ execCommands c (x:xs) =
execCommand :: Config -> (Runnable,String,String) -> IO (ThreadId, MVar String)
execCommand c com =
do var <- newMVar "Updating..."
- h <- forkIO $ runCommandLoop var c com
+ h <- forkOS $ runCommandLoop var c com
return (h,var)
runCommandLoop :: MVar String -> Config -> (Runnable,String,String) -> IO ()