Add check for interruption to gr_tpb_thread_body to ensure that
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 25 Mar 2009 22:29:21 +0000 (22:29 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 25 Mar 2009 22:29:21 +0000 (22:29 +0000)
threads stop quickly.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10686 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-core/src/lib/runtime/gr_tpb_thread_body.cc

index f61e1724365ed0c55692b5772cc43f03ef8922ad..e3abf6d8446bc62b6257ea3169a27ac25227112c 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 #include <gr_tpb_thread_body.h>
 #include <iostream>
+#include <boost/thread.hpp>
 
 gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block)
   : d_exec(block)
@@ -33,6 +34,8 @@ gr_tpb_thread_body::gr_tpb_thread_body(gr_block_sptr block)
   gr_block_executor::state s;
 
   while (1){
+    boost::this_thread::interruption_point();
+
     d->d_tpb.clear_changed();
     s = d_exec.run_one_iteration();