Flowgraph generates output even when the input exhausts

Hi,
I developed a gnuradio block that takes 2 inputs. Input_01 is coming
from a
source that repeats and Input_02 is coming from a source that exhausts
after
a while. The output should only be generated when there is data on both
the
input lines. I see in my flowgraph that even when the data on input_02
exhausts output is still generated even though I see no problem with my
C++
code. Its a simple operation in which for each input in Input_02 line
the
block outputs ‘N’ items from Input_01. Once, the data source (in this
case
is a file_source in non-repeat mode) for Input_02 exhausts i.e. the file
is
read completely the output should stop being generated as there is
nothing
coming on Input_02. I expect the previous data stored in the buffer for
Input_02 is flushed by the scheduler after one work() cycle.

Any help would be appreciated.
Thanks,
Mir

On Thu, Dec 03, 2009 at 11:16:01AM -0600, Mir M. Ali wrote:

coming on Input_02. I expect the previous data stored in the buffer for
Input_02 is flushed by the scheduler after one work() cycle.

Any help would be appreciated.
Thanks,
Mir

GNU Radio does work the way you described. You can confirm this by
doing something like:

src1 = gr.vector_source_f((1,2,3,4,5,6), False)
src2 = gr.vector_source_f((10,11,12,13,14,15), True)
op = gr.add_ff()
dst = gr.vector_sink_f()

tb.connect(src1, (op, 0))
tb.connect(src2, (op, 1))
tb.connect(op, dst)

tb.run()

This will halt.

There is most likely a problem in your block. If you’re subclassing
gr_block, are you calling consume or consume_each?

Eric

There was a problem in my block. I fixed it. I am using gr_block and
cosume_each.

Thanks for the help