I'm just wondering for clarification: are you looking for something that -- 
if the consumers p1, p2 ... pN were in `IO` -- might look like so:


    import Control.Concurrent.Async
    import qualified Pipes.Prelude as P
    import Pipes.Concurrent
    import Pipes
    import Control.Monad

    together :: Producer x IO () -> [Consumer x IO ()] -> IO ()
    together producer consumers = do
        (output, input) <- spawn unbounded
        as <- forM consumers $ \consumer ->
              async $ do runEffect $ fromInput input  >-> consumer
                         performGC
        a  <- async $ do runEffect $ producer >-> toOutput output
                         performGC
        mapM_ wait (a:as)

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haskell-pipes+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-pipes@googlegroups.com.

Reply via email to