Repository : ssh://[email protected]/base On branch : master Link : http://ghc.haskell.org/trac/ghc/changeset/d25204344ac356dcc0c587d75f147b7221760c85/base
>--------------------------------------------------------------- commit d25204344ac356dcc0c587d75f147b7221760c85 Author: Patrick Palka <[email protected]> Date: Sun Sep 8 12:22:01 2013 -0400 EventManager: Gracefully handle an initial 'Finished' state (#8235) Signed-off-by: Andreas Voellmy <[email protected]> >--------------------------------------------------------------- d25204344ac356dcc0c587d75f147b7221760c85 GHC/Event/Manager.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GHC/Event/Manager.hs b/GHC/Event/Manager.hs index 8c8858b..5c87d0c 100644 --- a/GHC/Event/Manager.hs +++ b/GHC/Event/Manager.hs @@ -248,6 +248,11 @@ loop mgr@EventManager{..} = do Created -> go `onException` cleanup mgr Releasing -> go `onException` cleanup mgr Dying -> cleanup mgr + -- While a poll loop is never forked when the event manager is in the + -- 'Finished' state, its state could read 'Finished' once the new thread + -- actually runs. This is not an error, just an unfortunate race condition + -- in Thread.restartPollLoop. See #8235 + Finished -> return () _ -> do cleanup mgr error $ "GHC.Event.Manager.loop: state is already " ++ show state _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
