diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-06 14:56:04 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-06 14:56:04 -0400 |
commit | a00f1d26bc3f121e49ee3f6ff5f46d7b330161ff (patch) | |
tree | 1951e9ca7e482fc67f9c232b0fb22680ee19f5a0 /Assistant/Threads/Committer.hs | |
parent | d11ded822cf68d4f33a886e0f97f95a3781e0dc1 (diff) |
display errors when any named thread crashes
Diffstat (limited to 'Assistant/Threads/Committer.hs')
-rw-r--r-- | Assistant/Threads/Committer.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index 5aadcc02a..fcf205311 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -36,8 +36,8 @@ thisThread :: ThreadName thisThread = "Committer" {- This thread makes git commits at appropriate times. -} -commitThread :: ThreadState -> ChangeChan -> CommitChan -> TransferQueue -> DaemonStatusHandle -> IO () -commitThread st changechan commitchan transferqueue dstatus = runEvery (Seconds 1) $ do +commitThread :: ThreadState -> ChangeChan -> CommitChan -> TransferQueue -> DaemonStatusHandle -> NamedThread +commitThread st changechan commitchan transferqueue dstatus = thread $ runEvery (Seconds 1) $ do -- We already waited one second as a simple rate limiter. -- Next, wait until at least one change is available for -- processing. @@ -61,6 +61,7 @@ commitThread st changechan commitchan transferqueue dstatus = runEvery (Seconds else refill readychanges else refill changes where + thread = NamedThread thisThread refill [] = noop refill cs = do debug thisThread |