[commit: base] : Update closeFd_ to avoid unnecessary backend modifications. (e9d98e5)
Johan Tibell
johan.tibell at gmail.com
Tue Feb 12 07:51:39 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch :
http://hackage.haskell.org/trac/ghc/changeset/e9d98e5c6e0590d239a789868976b64d93675fe9
>---------------------------------------------------------------
commit e9d98e5c6e0590d239a789868976b64d93675fe9
Author: Andreas Voellmy <andreas.voellmy at gmail.com>
Date: Fri Jan 4 09:47:37 2013 -0500
Update closeFd_ to avoid unnecessary backend modifications.
This makes closeFd follow the patten of closeFd_.
>---------------------------------------------------------------
GHC/Event/Manager.hs | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/GHC/Event/Manager.hs b/GHC/Event/Manager.hs
index fe6fb39..32dfc6d 100644
--- a/GHC/Event/Manager.hs
+++ b/GHC/Event/Manager.hs
@@ -369,8 +369,9 @@ closeFd_ mgr oldMap fd = do
(Nothing, _) -> return oldMap
(Just fds, !newMap) -> do
let oldEvs = eventsOf fds
- I.modifyFd (emBackend mgr) fd oldEvs mempty
- when (oldEvs /= mempty) $ wakeManager mgr
+ when (oldEvs /= mempty) $ do
+ I.modifyFd (emBackend mgr) fd oldEvs mempty
+ wakeManager mgr
forM_ fds $ \(FdData reg ev cb) -> cb reg (ev `mappend` evtClose)
return newMap
------------------------------------------------------------------------
More information about the ghc-commits
mailing list