aboutsummaryrefslogtreecommitdiff
path: root/Assistant/TransferSlots.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-31 02:34:03 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-31 02:34:03 -0400
commitacec36711090577752532a39f472e734e6b67fdb (patch)
tree6a3a5de0ec092e19c28464f4e2703fda9571b264 /Assistant/TransferSlots.hs
parent661eda766a8aa5c548ad89d8360bd4219eea138b (diff)
where indentation
Diffstat (limited to 'Assistant/TransferSlots.hs')
-rw-r--r--Assistant/TransferSlots.hs32
1 files changed, 16 insertions, 16 deletions
diff --git a/Assistant/TransferSlots.hs b/Assistant/TransferSlots.hs
index 80a062e36..8039c561d 100644
--- a/Assistant/TransferSlots.hs
+++ b/Assistant/TransferSlots.hs
@@ -54,20 +54,20 @@ runTransferThread (Just (t, info, a)) = do
runTransferThread' :: AssistantData -> IO () -> IO ()
runTransferThread' d a = go
- where
- go = catchPauseResume a
- pause = catchPauseResume $ runEvery (Seconds 86400) noop
- {- Note: This must use E.try, rather than E.catch.
- - When E.catch is used, and has called go in its exception
- - handler, Control.Concurrent.throwTo will block sometimes
- - when signaling. Using E.try avoids the problem. -}
- catchPauseResume a' = do
- r <- E.try a' :: IO (Either E.SomeException ())
- case r of
- Left e -> case E.fromException e of
- Just PauseTransfer -> pause
- Just ResumeTransfer -> go
- _ -> done
+ where
+ go = catchPauseResume a
+ pause = catchPauseResume $ runEvery (Seconds 86400) noop
+ {- Note: This must use E.try, rather than E.catch.
+ - When E.catch is used, and has called go in its exception
+ - handler, Control.Concurrent.throwTo will block sometimes
+ - when signaling. Using E.try avoids the problem. -}
+ catchPauseResume a' = do
+ r <- E.try a' :: IO (Either E.SomeException ())
+ case r of
+ Left e -> case E.fromException e of
+ Just PauseTransfer -> pause
+ Just ResumeTransfer -> go
_ -> done
- done = flip runAssistant d $
- flip MSemN.signal 1 <<~ transferSlots
+ _ -> done
+ done = flip runAssistant d $
+ flip MSemN.signal 1 <<~ transferSlots