summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2014-08-18 21:40:21 -0500
committerAustin Seipp <austin@well-typed.com>2014-08-18 23:26:19 -0500
commit88b1f99d473e5588378699abeb203c39ea554334 (patch)
treeca4b2b919fc6283ca99563876ba4d0ce59acbf3c
parent5d5655e9911dba10088b66421e98165c6cb8176e (diff)
downloadhaskell-88b1f99d473e5588378699abeb203c39ea554334.tar.gz
testsuite/T9379: Use GHC.Conc instead of Control.Concurrent.STM
Summary: `GHC.Conc` provides almost everything we need. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Test Plan: make test TEST=T9379 Reviewers: austin, simonmar Reviewed By: austin, simonmar Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D152
-rw-r--r--testsuite/tests/concurrent/should_run/T9379.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/tests/concurrent/should_run/T9379.hs b/testsuite/tests/concurrent/should_run/T9379.hs
index 49e6d1eaed..235b2aa58e 100644
--- a/testsuite/tests/concurrent/should_run/T9379.hs
+++ b/testsuite/tests/concurrent/should_run/T9379.hs
@@ -1,6 +1,6 @@
import Control.Exception
import Control.Concurrent
-import Control.Concurrent.STM
+import GHC.Conc
import Foreign.StablePtr
main :: IO ()
@@ -10,6 +10,8 @@ main = do
t <- mask_ $ forkIO (blockSTM tv)
killThread t
+check b = if b then return () else retry
+
blockSTM :: TVar Bool -> IO ()
blockSTM tv = do
atomically $ do