diff options
author | Joey Hess <joey@kitenet.net> | 2013-01-26 14:14:32 +1100 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-01-26 14:14:32 +1100 |
commit | 44d7913686ccfef4e6cbd0fdc2b5611aa944ec70 (patch) | |
tree | b8343b59f6730ff31fb7b88ffc11e13073d88c8e /Command/WebApp.hs | |
parent | 28eb1f598b1f494b6de815593fa8bfb9aaaeb250 (diff) |
use async to track and manage threads
Diffstat (limited to 'Command/WebApp.hs')
-rw-r--r-- | Command/WebApp.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs index 20a2ecdbe..b9d6159b7 100644 --- a/Command/WebApp.hs +++ b/Command/WebApp.hs @@ -109,10 +109,12 @@ firstRun = do urlrenderer <- newUrlRenderer v <- newEmptyMVar let callback a = Just $ a v - void $ runAssistant d $ runNamedThread $ - webAppThread d urlrenderer True - (callback signaler) - (callback mainthread) + runAssistant d $ do + startNamedThread $ + webAppThread d urlrenderer True + (callback signaler) + (callback mainthread) + waitNamedThreads where signaler v = do putMVar v "" |