Skip to content

Commit

Permalink
Fixing expected and tests/chez/chez003/IORef.idr to more appropriatel…
Browse files Browse the repository at this point in the history
…y test atomicModifyIORef functionality.
  • Loading branch information
Matthew-Mosior committed Sep 7, 2024
1 parent fc92369 commit 3ffb87c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
17 changes: 7 additions & 10 deletions tests/chez/chez003/IORef.idr
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion tests/chez/chez003/expected
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
188
188
42
84
168

0 comments on commit 3ffb87c

Please sign in to comment.