mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-17 00:10:31 +03:00
bd683938bf
Co-authored-by: Guillaume ALLAIS <guillaume.allais@ens-lyon.org>
16 lines
306 B
Idris
16 lines
306 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
|