diff options
author | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2007-10-06 12:54:47 +0200 |
---|---|---|
committer | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2007-10-06 12:54:47 +0200 |
commit | ed885c39e52be7a81163fcdddd9fd00e30c6eb8a (patch) | |
tree | 6ee6ff8ff4bcee2bccc85897ae43c22ac938d274 | |
parent | 94a42859c1783bc36b37e139d89a6163e066bf46 (diff) | |
download | xmobar-ed885c39e52be7a81163fcdddd9fd00e30c6eb8a.tar.gz xmobar-ed885c39e52be7a81163fcdddd9fd00e30c6eb8a.tar.bz2 |
Remove MVar from eventLoop.
darcs-hash:20071006105447-903e8-d5b4a5499d79f5749ca8630afb98b6eef7590510.gz
-rw-r--r-- | Xmobar.hs | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -70,12 +70,11 @@ runX c d w f = runReaderT f (XConf d w c) -- | The event loop eventLoop :: Config -> [(Maybe ThreadId, TVar String)] -> Display -> Window -> IO () -eventLoop c v d w = do - b <- newEmptyMVar +eventLoop c v d w = block $ do tv <- atomically $ newTVar [] - t <- forkIO (block $ do putMVar b (); go tv) - takeMVar b - checker t tv "" + t <- myThreadId + forkIO $ checker t tv "" + go tv where -- interrupt the drawing thread every time a var is updated checker t tvar ov = do |