Repository : ssh://[email protected]/base On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/3cb2d582fef3f79d1f21cf7bd984a7477c58e9e4/base
>--------------------------------------------------------------- commit 3cb2d582fef3f79d1f21cf7bd984a7477c58e9e4 Author: Patrick Palka <[email protected]> Date: Sun Sep 1 17:34:31 2013 -0400 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. >--------------------------------------------------------------- 3cb2d582fef3f79d1f21cf7bd984a7477c58e9e4 GHC/Event/Thread.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GHC/Event/Thread.hs b/GHC/Event/Thread.hs index c4f83a0..61abbd0 100644 --- a/GHC/Event/Thread.hs +++ b/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)) _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
