Idris2/tests/racket/channels001/Main.idr

17 lines
293 B
Idris
Raw Normal View History

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