Problem loading Python block

I am more than willing to try new message passing interface. The idea
with
the thread is a bit old, that’s what I have heard, from more experienced
guys. Are there any blocs that uses new message passing interface, so
that
I can take a look how it works?

@Tom
Nothing happened by adding self.connect(self) in top_block.

This block design style i picked up from grExtras module. Maybe they use
different “something”, and their block is called even when it has no
inputs/outputs.

Best
Nemanja

function and nothing happens. The work function looks like this:

Could the problem be no inputs and no outputs? Or maybe something else?

Best and thanks

Nemanja

Hi Nemanja,

the work function is called by the scheduler, which only calls the work
function, if it has some samples to process. So if your block is not
part
of the flow graph (which it isn’t since you have no input or output
stream) it will not get called.

You could either create a Thread in the block’s constructor which will
call the work function (the start/stop functions seem to not being
called
either), or you could try the new message passing interface, where you
can
register a callback function that is called whenever a new message
arrives.

Yours
Martin