Call watchTree in background (faster startup when there are lots of files)

This commit is contained in:
Michael Snoyman 2014-05-14 08:09:21 +03:00
parent cf20f15957
commit cb95446469

View File

@ -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