Idris2/tests/allschemes/channels001/Main.idr
2022-10-04 10:24:27 +02: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