From: Ian Lynagh Date: Fri, 10 Jul 2009 00:38:01 +0000 (+0000) Subject: Minor code tidyups in GHC.Conc X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0a51dcee4eeeaa8e81e7261bca24f97d601b136a;p=ghc-base.git Minor code tidyups in GHC.Conc --- diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index 21034cb..67a2199 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -848,9 +848,7 @@ service_loop wakeup old_delays = do _ | r2 == io_MANAGER_DIE -> return True 0 -> return False -- spurious wakeup _ -> do start_console_handler (r2 `shiftR` 1); return False - if exit - then return () - else service_cont wakeup delays' + unless exit $ service_cont wakeup delays' _other -> service_cont wakeup delays' -- probably timeout @@ -1049,7 +1047,7 @@ service_loop wakeup readfds writefds ptimeval old_reqs old_delays = do runHandlers' fp (fromIntegral s) return False - if exit then return () else do + unless exit $ do atomicModifyIORef prodding (\_ -> (False, ()))