mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-23 11:43:08 +03:00
17 lines
293 B
Idris
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
|