Idris2/tests/racket/mutex004/Main.idr
2021-03-15 13:43:12 +00:00

17 lines
300 B
Idris

-- Idris2
import System
import System.Concurrency
||| Test double-release errors correctly
main : IO ()
main =
do m <- makeMutex
mutexAcquire m
putStrLn "Mutex acquired"
mutexRelease m
putStrLn "1st release"
mutexRelease m
putStrLn "2nd release (SHOULDN'T HAPPEN)"