diff options
author | Josh Blum | 2012-10-04 20:01:53 -0700 |
---|---|---|
committer | Josh Blum | 2012-10-04 20:01:53 -0700 |
commit | 3b26ff66074621c1fd1dc26b616ec1583c2fb024 (patch) | |
tree | 3cbe010f6f2cbd20eafa020e8525d11bb56b6c5a /lib | |
parent | 80ad97851736b0ebaba0347480e8cbcadd2f4ada (diff) | |
download | sandhi-3b26ff66074621c1fd1dc26b616ec1583c2fb024.tar.gz sandhi-3b26ff66074621c1fd1dc26b616ec1583c2fb024.tar.bz2 sandhi-3b26ff66074621c1fd1dc26b616ec1583c2fb024.zip |
updated to latest subprojects, got compiling
due to the return 0 fix, interruptible threads are now optional, and by defualt off
added empty hooks for max/min buffer stuff so its compiling...
Diffstat (limited to 'lib')
-rw-r--r-- | lib/block.cpp | 6 | ||||
-rw-r--r-- | lib/block_handlers.cpp | 2 | ||||
-rw-r--r-- | lib/gras_impl/block_actor.hpp | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/lib/block.cpp b/lib/block.cpp index 75fd910..dce8f8e 100644 --- a/lib/block.cpp +++ b/lib/block.cpp @@ -43,6 +43,7 @@ Block::Block(const std::string &name): this->set_fixed_rate(true); this->set_relative_rate(1.0); this->set_tag_propagation_policy(TPP_ALL_TO_ALL); + this->set_interruptible_work(false); } template <typename V, typename T> @@ -238,3 +239,8 @@ void Block::set_buffer_affinity(const Affinity &affinity) { (*this)->block->buffer_affinity = affinity; } + +void Block::set_interruptible_work(const bool enb) +{ + (*this)->block->interruptible_work = enb; +} diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp index 694f781..eeb54aa 100644 --- a/lib/block_handlers.cpp +++ b/lib/block_handlers.cpp @@ -130,7 +130,7 @@ void BlockActor::handle_top_thread_group( //spawn a new thread if this block is a source this->thread_group = message; this->interruptible_thread.reset(); //erase old one - if (this->get_num_inputs() == 0) //its a source + if (this->interruptible_work) { this->interruptible_thread = boost::make_shared<InterruptibleThread>( this->thread_group, boost::bind(&BlockActor::task_work, this) diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 745483f..dada926 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -163,6 +163,7 @@ struct BlockActor : Apology::Worker Block::tag_propagation_policy_t tag_prop_policy; //interruptible thread stuff + bool interruptible_work; SharedThreadGroup thread_group; boost::shared_ptr<InterruptibleThread> interruptible_thread; |