Catching the end of flowgraph execution

Hello again guys,

this is some kind of next stage of my previous queston. Namely, I have
top
block with two flowgraphs, rx_path and tx_path. tx_path produces known
number of samples during which time rx_path receivees. As soon as
tx_path
is finishes I should also stop rx_path, or at least to close certain
file
sinks. Is there any way to catch that flowgraph (in this case
subflograph)
is finished with execution and have no more samples to produce?

Best and thanx again,