Hi Ben,

I was having problems with what appears to be blocks of data being saved out
of sync (tended to happen at decimation rates lower than 100) but I haven't
had a chance to get to the root of this issue, my current line of thinking
is that when blocks have a side effect the ordering isnt guarenteed.

I modified the USRP2 source to output a second stream of timestamps and
found the problem by running a quick sanity check by saving to disk, then
importing and checking if each timestamp is higher than the one preceding
it.
When using a C++ module (rather than a file sink) to check this everything
seemed to be working as expected hence me thinking that it only occurs when
the blocks output isnt limited to gnuradio.

I might be completely wrong as I cant seem to find the code for the
multi-threaded scheduler to try and work out whats going on, can anyone
point me in the right direction?

Cheers,

Tim

On Mon, Dec 7, 2009 at 6:18 PM, Ben Gear <bg...@dunelm.org.uk> wrote:

> Hi all,
>
> Does anyone know if the scheduler is guaranteed to process blocks in
> the correct order?  For example, say you have a block with side
> effects such as writing to a file, could it ever occur that the
> scheduler is processing several work functions for the same block
> concurrently in different threads,  the threads execute at a different
> rate and you end up with a file written out of order?  In a similar
> manner is accessing block member variables safe?  For example I want
> to write a 'latch' block that takes in and outputs bits.  The output
> will be low while the input is low until the first high bit is
> received and then the output will remain high until it is reset.  If I
> store the latch state in a member variable is it guaranteed that when
> the latch is triggered at a given sample number all the output sample
> before hand will be 0 and all after will be 1?
>
> Many thanks,
>
> Ben Gear
>
>
> _______________________________________________
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to