I'm new to the Intel Threading Building Blocks and playing with the flow graph component. So far, its worked mostly well. My messages between nodes are shared_ptr
types so they are copy-constructble, lightweight, and the underlying resource is disposed of at the end of a graph cycle...
Except for messages that originate from my input_node
. input_node
is designed so that it holds a copy of its last output value. This means that the any resource held by the value output by an input_node
won't be released until the input_node
generates its next output.
This seems awkward/inconsistent with the rest of the API. Any thoughts on how to deal with it? I guess I could write my own node, but I'd rather not. Should I just use try_put
? If so, how do I let the graph know when I'm done providing inputs, so that wait_for_all
doesn't conclude early?