Idris2/tests/racket/semaphores001/Main.idr

14 lines
227 B
Idris
Raw Normal View History

module Main
import System.Concurrency
main : IO ()
main = do
sema <- makeSemaphore 0
semaphorePost sema
semaphorePost sema
putStrLn "Hello"
semaphoreWait sema
semaphoreWait sema
putStrLn "Goodbye"