Idris2/tests/racket/channels001/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

17 lines
293 B
Idris

module Main
import System
import System.Concurrency
main : IO ()
main = do
chan <- makeChannel
threadID <- fork $ do
channelPut chan "Hello"
channelPut chan "Goodbye"
val <- channelGet chan
putStrLn val
val <- channelGet chan
putStrLn val
sleep 1