[commit: base] master: Fix bug that caused ghci to create a large number of kqueues and pipes on OS X. (a372e40)
Johan Tibell
johan.tibell at gmail.com
Tue Feb 12 07:51:45 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/packages/base
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/a372e4050f4d0bca33657e677a735aaa6ef88e58
>---------------------------------------------------------------
commit a372e4050f4d0bca33657e677a735aaa6ef88e58
Author: Andreas Voellmy <andreas.voellmy at gmail.com>
Date: Sun Feb 10 15:06:37 2013 -0800
Fix bug that caused ghci to create a large number of kqueues and pipes on OS X.
This is caused because ensureIOManagerIsRunning is repeatedly called and this was initializing new IO managers on each call. Fixed so that a new manager is not created if one already exists.
>---------------------------------------------------------------
GHC/Event/Thread.hs | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/GHC/Event/Thread.hs b/GHC/Event/Thread.hs
index 9a43b4f..cbef3c3 100644
--- a/GHC/Event/Thread.hs
+++ b/GHC/Event/Thread.hs
@@ -276,11 +276,7 @@ startIOManagerThread eventManagerArray i = do
-- See #4449
M.cleanup em
create
- _other -> do
- -- Another thread is currently servicing the manager loop.
- -- Tell it to exit and start a new thread to work on the loop.
- M.release em
- create
+ _other -> return ()
startTimerManagerThread :: IO ()
startTimerManagerThread = modifyMVar_ timerManagerThreadVar $ \old -> do
More information about the ghc-commits
mailing list