on b1ee90e help sign in
streamly/test/gather.hs
14 lines 281 B history raw
1import Control.Concurrent (threadDelay, myThreadId)
2import Control.Monad.IO.Class (liftIO)
3import System.Random (randomIO)
4import System.IO
6import Asyncly
8--- Check space leaks
10main = do
11 x <- wait $ do
12 y <- gather $ each [1..10]
13 liftIO $ print y
14 print x