diff options
author | Josh Blum | 2012-11-07 01:16:49 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-07 01:16:49 -0800 |
commit | 4e6548ed237f3d6eda4383d6a07a4d1e99f404f6 (patch) | |
tree | 6b10f8d47259eb831eec88c07f95b7bfbc6b3fb4 /lib/block_task.cpp | |
parent | 0f0c68c4a8c32c43eee8f1589878abe376e2b1da (diff) | |
download | sandhi-4e6548ed237f3d6eda4383d6a07a4d1e99f404f6.tar.gz sandhi-4e6548ed237f3d6eda4383d6a07a4d1e99f404f6.tar.bz2 sandhi-4e6548ed237f3d6eda4383d6a07a4d1e99f404f6.zip |
some fixes from the last commit
Diffstat (limited to 'lib/block_task.cpp')
-rw-r--r-- | lib/block_task.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/block_task.cpp b/lib/block_task.cpp index cfe5bb0..ee4d075 100644 --- a/lib/block_task.cpp +++ b/lib/block_task.cpp @@ -75,13 +75,6 @@ void BlockActor::input_fail(const size_t i) { SBuffer &buff = this->input_queues.front(i); - //check that the input is not already maxed - const size_t front_items = buff.length/this->input_items_sizes[i]; - if (front_items >= this->input_configs[i].maximum_items) - { - //throw std::runtime_error("input_fail called on maximum_items buffer"); - } - //input failed, accumulate and try again if (not this->input_queues.is_accumulated(i)) { @@ -91,7 +84,18 @@ void BlockActor::input_fail(const size_t i) } //otherwise check for done, else wait for more - if (this->inputs_done[i]) this->mark_done(); + if (this->inputs_done[i]) + { + this->mark_done(); + return; + } + + //check that the input is not already maxed + const size_t front_items = buff.length/this->input_items_sizes[i]; + if (front_items >= this->input_configs[i].maximum_items) + { + //throw std::runtime_error("input_fail called on maximum_items buffer"); + } } void BlockActor::output_fail(const size_t i) |