diff options
author | Andreas Voellmy <andreas.voellmy@gmail.com> | 2013-02-10 15:06:37 -0800 |
---|---|---|
committer | Johan Tibell <johan.tibell@gmail.com> | 2013-02-11 21:38:08 -0800 |
commit | aceb3e899f8e33fe85aced76c41615c71e5bd168 (patch) | |
tree | a193f837942b9309ffb1ccf542c07c5e6888eb9a /libraries/base/GHC/Event | |
parent | ebf3787ae98afe6f4c3dd1c604cc8a48ebc9f768 (diff) | |
download | haskell-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.hs | 6 |
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 |