|
From: | Tommy Tracy II |
Subject: | Re: [Discuss-gnuradio] How does a C++ custom block kill the FlowGraph |
Date: | Fri, 21 Feb 2014 12:27:39 -0500 |
Thank you. I have another question. I have a strange situation where I have two sub-flowgraphs. The two sub-flowgraphs are connected by a message queue. The 1st Sink can talk to the 2nd Source through this queue. TOP BLOCK{ 1st subgraph [1st Source]——[…]——[1st Sink] 2nd subgraph [2nd Source] ——[…]——[2nd Sink] } Both sub-flowgraphs use the same top block (you can’t have two top blocks in one application). Unfortunately, because they are disjoint, if the 1st Source returns WORK_DONE, it won’t call the other blocks’ destructors as I would expect. It appears that 2nd Source needs to return WORK_DONE as well to kill it’s subgraph, and thus the entire flow graph. My problem is that 2nd Source depends on 1st Sink. My original plan was for 1st Sink to send a message ‘stop’ to 2nd Source, which would then return WORK_DONE and effectively kill the entire flow graph. Unfortunately, my plan was to do this in the destructor of 1st Sink, because at that point the 1st’s sink know’s it’s done processing. This destructor isn’t called until all blocks are done, so I’ve got a cyclic dependency. Is it possible for blocks to know if other blocks are done? I could have some code in my 1st Sink's work function send that ‘stop’ message outside of the destructor as originally intended. Sincerely, Tommy James Tracy II Ph.D Student High Performance Low Power Lab University of Virginia Phone: 913-775-2241 On Feb 10, 2014, at 12:33 PM, Martin Braun <address@hidden> wrote: On 10.02.2014 09:18, Tommy Tracy II wrote:Dear Gnuradio Community, |
signature.asc
Description: Message signed with OpenPGP using GPGMail
[Prev in Thread] | Current Thread | [Next in Thread] |