|Subject:||Re: [Discuss-gnuradio] block without work function won't stop|
|Date:||Tue, 26 May 2015 14:37:55 +0200|
the point is that with message passing, it's not clear that your block is ever finished.
Hence in block.cc, we have a mechanism to retrieve the "finishedness" of a pure-message-block.
if((detail()->ninputs() != 0) || (detail()->noutputs() != 0))
So, you'll have to set the d_finished variable of your block; sadly, that's a private one by design (I think there are thread-safety reasons this is not directly exposed, but I'm not sure -- I'd have to as T[io]m about that).
The proper way to do so is to send your block a message to its pmt::mp("system") port, containing pmt::mp("done").
On 05/26/2015 02:10 PM, Nemanja Savic wrote:
Best,Is there any issue with messages in this case. Should I manually delete messages from the message queue or something like that.Hi all,I have a block that is used only for acepting messages and writing their content into database. The block is written in python and it has no work function, but only constructor and message handler. However when I run my flowgraph it won't finish until I terminate it. When I exclude this block it runs to completion normally.
_______________________________________________ Discuss-gnuradio mailing list address@hidden https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Discuss-gnuradio mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|