Idris2/tests/racket/semaphores001/Main.idr
Wen Kokke bd683938bf
Overhaul of concurrency primitives (#968)
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
2021-02-05 16:16:20 +00:00

14 lines
227 B
Idris

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