snoyberg/conduit — Issue #19: Allow concurrently-running conduits.
Author: wowus
Created: 2012-02-08 15:43:25+00:00
State: open

Often, I want to run different parts of a pipeline in parallel, very similar to unix pipes. I find myself avoiding conduits for tasks such as:

loadTexture "myPicture.png" $$ uploadToGraphicsCard

What I really want to do with this is something like:

concurrently (loadTexture "myPicture.png") $$ uploadToGraphicsCard

Where the "concurrently" combinator would run the "loadTexture" task in a forkIO'd thread, putting the results into a Chan, and then read from the Chan when uploadToGraphicsCard pulls a result.

This would currently be relatively annoying to implement, since (afaik) you need a concurrently combinator for sources, sinks, and channels. Is there any way to unify these?