Commit ed49bfde authored by Simon Marlow's avatar Simon Marlow
Browse files

add test for #4811

parent 9d677eeb
import GHC.Conc
import Control.Concurrent
import Control.Monad
-- tests for a bug where throwTo targets a thread just created by
-- forkOnIO, which is still in the process of migrating to another CPU (#4811)
main = do
m <- newEmptyMVar
forkOnIO 0 $ do
replicateM_ 1000 $ do
t <- forkOnIO 1 $ return ()
killThread t
putMVar m ()
takeMVar m
......@@ -49,6 +49,7 @@ test('4262', [ skip, # skip for now, it doesn't give reliable results
compile_and_run, [''])
test('4813', normal, compile_and_run, ['-debug'])
test('4811', normal, compile_and_run, [''])
# -----------------------------------------------------------------------------
# These tests we only do for a full run
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment