diff options
author | Josh Blum | 2012-09-11 19:44:43 -0700 |
---|---|---|
committer | Josh Blum | 2012-09-11 19:44:43 -0700 |
commit | 80ad579996caebe4150a00b727fcd568730be53f (patch) | |
tree | a1b5fdf869ff54e62c703f294af4a2c6a43c7e4b /lib/block_handlers.cpp | |
parent | 3e820aba9c4ef292508c00b686d54eaca040c200 (diff) | |
download | sandhi-80ad579996caebe4150a00b727fcd568730be53f.tar.gz sandhi-80ad579996caebe4150a00b727fcd568730be53f.tar.bz2 sandhi-80ad579996caebe4150a00b727fcd568730be53f.zip |
simplify interruptible_thread use, give it a bound callable object
Diffstat (limited to 'lib/block_handlers.cpp')
-rw-r--r-- | lib/block_handlers.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp index 3e861be..5811acc 100644 --- a/lib/block_handlers.cpp +++ b/lib/block_handlers.cpp @@ -17,6 +17,7 @@ #include "element_impl.hpp" #include <gras_impl/vector_utils.hpp> #include <boost/make_shared.hpp> +#include <boost/bind.hpp> using namespace gnuradio; @@ -68,8 +69,9 @@ void ElementImpl::handle_block_msg( this->interruptible_thread.reset(); //erase old one if (task_iface.get_num_inputs() == 0) //its a source { - this->interruptible_thread = - boost::make_shared<InterruptibleThread>(this->thread_group); + this->interruptible_thread = boost::make_shared<InterruptibleThread>( + this->thread_group, boost::bind(&ElementImpl::task_work, this) + ); } return; } |