summaryrefslogtreecommitdiff
path: root/libraries/base/GHC/Event
diff options
context:
space:
mode:
authorAndreas Voellmy <andreas.voellmy@gmail.com>2013-02-10 15:06:37 -0800
committerJohan Tibell <johan.tibell@gmail.com>2013-02-11 21:38:08 -0800
commitaceb3e899f8e33fe85aced76c41615c71e5bd168 (patch)
treea193f837942b9309ffb1ccf542c07c5e6888eb9a /libraries/base/GHC/Event
parentebf3787ae98afe6f4c3dd1c604cc8a48ebc9f768 (diff)
downloadhaskell-aceb3e899f8e33fe85aced76c41615c71e5bd168.tar.gz
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.
Diffstat (limited to 'libraries/base/GHC/Event')
-rw-r--r--libraries/base/GHC/Event/Thread.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/libraries/base/GHC/Event/Thread.hs b/libraries/base/GHC/Event/Thread.hs
index 9a43b4f9c0..cbef3c3c62 100644
--- a/libraries/base/GHC/Event/Thread.hs
+++ b/libraries/base/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