diff --git a/tests/chez/chez003/IORef.idr b/tests/chez/chez003/IORef.idr index 7b8b296ae8..5e22448913 100644 --- a/tests/chez/chez003/IORef.idr +++ b/tests/chez/chez003/IORef.idr @@ -14,17 +14,14 @@ main printLn val val <- readIORef y printLn val - z <- newIORef 42 + z <- newIORef 42 val <- readIORef z printLn val - tid1 <- fork $ do + t1 <- fork $ do atomicModifyIORef z (* 2) - val <- readIORef z - printLn val - threadWait tid1 - tid2 <- fork $ do + t2 <- fork $ atomicModifyIORef z (* 2) - val <- readIORef z - printLn val - threadWait tid2 - pure () + threadWait t1 + threadWait t2 + val <- readIORef z + printLn val diff --git a/tests/chez/chez003/expected b/tests/chez/chez003/expected index aad691cac1..2dff5cccaa 100644 --- a/tests/chez/chez003/expected +++ b/tests/chez/chez003/expected @@ -3,5 +3,4 @@ 188 188 42 -84 168