diff options
author | Patrick Palka <patrick@parcs.ath.cx> | 2013-09-01 17:34:31 -0400 |
---|---|---|
committer | Patrick Palka <patrick@parcs.ath.cx> | 2013-09-02 11:52:06 -0400 |
commit | cc99f64a5e15f0c40a4f24dd6e13d95af9455e09 (patch) | |
tree | 4f2bba6cd679941810fcc7f28343a492c5772aef /libraries/base/GHC/Event/Thread.hs | |
parent | 797a36861bd5aeb526f2cdc9a20d373d3616e478 (diff) | |
download | haskell-cc99f64a5e15f0c40a4f24dd6e13d95af9455e09.tar.gz |
Fix off-by-one error in the IO manager
The last enabled event manager was being needlessly restarted after
increasing the number of capabilities at runtime.
Diffstat (limited to 'libraries/base/GHC/Event/Thread.hs')
-rw-r--r-- | libraries/base/GHC/Event/Thread.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/GHC/Event/Thread.hs b/libraries/base/GHC/Event/Thread.hs index c4f83a0422..61abbd078c 100644 --- a/libraries/base/GHC/Event/Thread.hs +++ b/libraries/base/GHC/Event/Thread.hs @@ -332,7 +332,7 @@ ioManagerCapabilitiesChanged = do -- copy the existing values into the new array: forM_ [0..high] $ \i -> do Just (tid,mgr) <- readIOArray eventManagerArray i - if i < numEnabled - 1 + if i < numEnabled then writeIOArray new_eventManagerArray i (Just (tid,mgr)) else do tid' <- restartPollLoop mgr i writeIOArray new_eventManagerArray i (Just (tid',mgr)) |