Idris2/tests/racket/mutex004/Main.idr

17 lines
300 B
Idris
Raw Normal View History

-- 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)"