commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 04/18: runtime: allow msg port block finish


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/18: runtime: allow msg port block finish cleanly
Date: Fri, 1 Jul 2016 16:25:44 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch next
in repository gnuradio.

commit a88230786e04d8cb8dd169cefe9b7491be5cc6d0
Author: Bastian Bloessl <address@hidden>
Date:   Thu Apr 21 07:36:05 2016 +0200

    runtime: allow msg port block finish cleanly
---
 gnuradio-runtime/lib/tpb_thread_body.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc 
b/gnuradio-runtime/lib/tpb_thread_body.cc
index 59a3712..ab374f3 100644
--- a/gnuradio-runtime/lib/tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/tpb_thread_body.cc
@@ -123,11 +123,16 @@ namespace gr {
       }
       else {
         s = block_executor::BLKD_IN;
+        // a msg port only block wants to shutdown
+        if(block->finished()) {
+          s = block_executor::DONE;
+        }
       }
 
-      // if msg ports think we are done, we are done
-      if(block->finished())
+      if(block->finished() && s == block_executor::READY_NO_OUTPUT) {
         s = block_executor::DONE;
+        d->set_done(true);
+      }
 
       switch(s){
       case block_executor::READY:              // Tell neighbors we made 
progress.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]