summaryrefslogtreecommitdiff
path: root/src/Hakyll/Core
diff options
context:
space:
mode:
authorJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-21 10:56:04 +0100
committerJasper Van der Jeugt <jaspervdj@gmail.com>2011-02-21 10:56:04 +0100
commit678f18973f48975712649c8e209199f5c86c0e73 (patch)
tree70a957961dad85dd786ca990f35d59111c2ae94d /src/Hakyll/Core
parent256cc760bae2e8bc4238fb8b903ffc92a36d7db9 (diff)
downloadhakyll-678f18973f48975712649c8e209199f5c86c0e73.tar.gz
Quit/Sync bug fix
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r--src/Hakyll/Core/Logger.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Hakyll/Core/Logger.hs b/src/Hakyll/Core/Logger.hs
index c5b8531..8f5a4f9 100644
--- a/src/Hakyll/Core/Logger.hs
+++ b/src/Hakyll/Core/Logger.hs
@@ -9,6 +9,7 @@ module Hakyll.Core.Logger
, timed
) where
+import Control.Monad (forever)
import Control.Monad.Trans (MonadIO, liftIO)
import Control.Applicative ((<$>), (<*>))
import Control.Concurrent (forkIO)
@@ -33,15 +34,13 @@ makeLogger = do
_ <- forkIO $ loggerThread logger
return logger
where
- loggerThread logger = do
+ loggerThread logger = forever $ do
msg <- readChan $ loggerChan logger
case msg of
-- Stop: sync
Nothing -> putMVar (loggerSync logger) ()
-- Print and continue
- Just m -> do
- putStrLn m
- loggerThread logger
+ Just m -> putStrLn m
-- | Flush the logger (blocks until flushed)
--