mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 18:21:47 +03:00
16 lines
307 B
Idris
16 lines
307 B
Idris
module Main
|
|
|
|
import System
|
|
import System.Concurrency
|
|
|
|
main : IO ()
|
|
main = do
|
|
barrier <- makeBarrier 3
|
|
threadIDs <- for [1,2,3] $ \n => fork $ do
|
|
putStrLn "Hello"
|
|
barrierWait barrier
|
|
putStrLn "Goodbye"
|
|
for_ threadIDs $ \threadID =>
|
|
threadWait threadID
|
|
sleep 1
|