summaryrefslogtreecommitdiff
path: root/lib/input_handlers.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-09-29 14:45:29 -0700
committerJosh Blum2012-09-29 14:45:29 -0700
commitec1677346389ab3b434d81c6bde15321f3dbe209 (patch)
treea4fd8498e64dd90f2fc169a9de747e49e2173830 /lib/input_handlers.cpp
parentb194049a9fb5ab60f15bfcca1a53e39a42339244 (diff)
downloadsandhi-ec1677346389ab3b434d81c6bde15321f3dbe209.tar.gz
sandhi-ec1677346389ab3b434d81c6bde15321f3dbe209.tar.bz2
sandhi-ec1677346389ab3b434d81c6bde15321f3dbe209.zip
create IO subscriber bitset for tracking done
Diffstat (limited to 'lib/input_handlers.cpp')
-rw-r--r--lib/input_handlers.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp
index f01ad28..461600f 100644
--- a/lib/input_handlers.cpp
+++ b/lib/input_handlers.cpp
@@ -55,9 +55,14 @@ void BlockActor::handle_input_check(const InputCheckMessage &message, const Ther
const size_t index = message.index;
//an upstream block declared itself done, recheck the token
- if (this->input_queues.empty(index) and this->input_tokens[index].unique())
+ this->inputs_done.set(index, this->input_tokens[index].unique());
+
+ if ((~this->inputs_done).none()) //no upstream providers
{
- this->mark_done();
+ if (not this->input_queues.all_ready())
+ {
+ this->mark_done();
+ }
}
}