From 0a51dcee4eeeaa8e81e7261bca24f97d601b136a Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Fri, 10 Jul 2009 00:38:01 +0000 Subject: [PATCH] Minor code tidyups in GHC.Conc --- GHC/Conc.lhs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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, ())) -- 1.7.10.4