From d119a36b71c03e4fa13651a2153cd9a0ad460e3a Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Tue, 17 Jul 2007 19:13:07 +0200 Subject: 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 --- Xmobar.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Xmobar.hs') 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 () -- cgit v1.2.3