From cb954464693db12d37a3b39b7f0e290ab52785cd Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 14 May 2014 08:09:21 +0300 Subject: [PATCH] Call watchTree in background (faster startup when there are lots of files) --- yesod-bin/Devel.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yesod-bin/Devel.hs b/yesod-bin/Devel.hs index f8e78432..c7c59ae7 100644 --- a/yesod-bin/Devel.hs +++ b/yesod-bin/Devel.hs @@ -215,7 +215,8 @@ devel opts passThroughArgs = withSocketsDo $ withManager $ \manager -> do putStrLn $ "Yesod devel server. " ++ terminator ++ " to quit" void $ forkIO $ do filesModified <- newEmptyMVar - watchTree manager "." (const True) (\_ -> void (tryPutMVar filesModified ())) + void $ forkIO $ + watchTree manager "." (const True) (\_ -> void (tryPutMVar filesModified ())) evalStateT (mainOuterLoop iappPort filesModified) Map.empty after writeLock opts