mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 10:02:03 +03:00
15 lines
253 B
Idris
15 lines
253 B
Idris
|
module Main
|
||
|
|
||
|
import System.Concurrency
|
||
|
|
||
|
main : IO ()
|
||
|
main = do
|
||
|
sema <- makeSemaphore 0
|
||
|
fork $ do
|
||
|
putStrLn "Hello"
|
||
|
semaphorePost sema
|
||
|
semaphorePost sema
|
||
|
semaphoreWait sema
|
||
|
semaphoreWait sema
|
||
|
putStrLn "Goodbye"
|