I am working on an image processing application which is built with tbb::flow_graph. The input comes from a video file or a camera. Each image processing node is wrapped in a multifunction_node (I need the multifunction_node's ability to selectively stop propagating graph messages). Currently I am using graph.wait_for_all() after feeding each input frame into the root node, but I would like to be able to take advantage of pipeline parallelism. I.e. if node A is connected to node B, I would like to let node A start working on its next input after it is done producing its output for B, instead of waiting for B to finish.
Could you please provide cues for how to do this efficiently and idiomatically? I am new to TBB and I feel that I might be missing something obvious.