diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/block_task.cpp | 7 | ||||
-rw-r--r-- | lib/input_handlers.cpp | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/block_task.cpp b/lib/block_task.cpp index 87d0c8a..21986fc 100644 --- a/lib/block_task.cpp +++ b/lib/block_task.cpp @@ -36,6 +36,13 @@ void BlockActor::mark_done(void) this->input_queues.flush_all(); this->output_queues.flush_all(); + //release all tags and msgs + for (size_t i = 0; i < this->get_num_inputs(); i++) + { + this->input_msgs[i].clear(); + this->input_tags[i].clear(); + } + //tell the upstream and downstram to re-check their tokens //this is how the other blocks know who is interested, //and can decide based on interest to set done or not diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp index e3b5203..27704fe 100644 --- a/lib/input_handlers.cpp +++ b/lib/input_handlers.cpp @@ -12,6 +12,7 @@ void BlockActor::handle_input_tag(const InputTagMessage &message, const Theron:: const size_t index = message.index; //handle incoming stream tag, push into the tag storage + if (this->block_state == BLOCK_STATE_DONE) return; this->input_tags[index].push_back(message.tag); this->input_tags_changed[index] = true; } |