Commit e55a9f08 authored by Edward Z. Yang's avatar Edward Z. Yang

Follow removal of block in base.

Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <ezyang@mit.edu>
parent 957b959d
...@@ -59,7 +59,7 @@ main :: IO () ...@@ -59,7 +59,7 @@ main :: IO ()
main = do main = do
hSetBuffering stdout NoBuffering hSetBuffering stdout NoBuffering
[nthreads] <- fmap (map read) getArgs [nthreads] <- fmap (map read) getArgs
tids <- replicateM nthreads $ block $ forkIO $ return () tids <- replicateM nthreads . mask $ \_ -> forkIO $ return ()
m <- newEmptyMVar m <- newEmptyMVar
-- do it in a subthread to avoid bound-thread overhead -- do it in a subthread to avoid bound-thread overhead
forkIO $ do mapM_ killThread tids; putMVar m () forkIO $ do mapM_ killThread tids; putMVar m ()
......
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