On Wed, Jul 21, 2010 at 10:37 AM, Eric Blossom
<address@hidden> wrote:
On Wed, Jul 21, 2010 at 10:15:29AM -0700, Sean Jordan wrote:
> I am fairly new to gnuradio and am working on some of my own blocks. I am
> trying to understand how the blocks are given control of the cpu. I am using
> the grc interface. I currently think that each block runs till it is done
> then gives control to the next block, then when all blocks have run the
> process starts over. However I set some flags that have caused me to
> question that understanding. A better explanation of how the system works
> would be much appreciated.
>
> Thanks, Sean
This is somewhat simplified, but reasonably close:
With the thread-per-block scheduler, blocks are "available to
run" whenever there is input available on its inputs and output
space available in the downstream buffer.
When the block actually runs is dependent on the underlying OS
scheduler. In user space, everything is controlled with condition
variables and their associated mutexes. With the thread-per-block
scheduler there is almost always more than 1 block running
simultaneously.
Eric
Thanks, with this in mind, I need in my application for only one block to be running at a time. Is there any way for that to be specified?