diff options
author | Josh Blum | 2012-10-05 21:14:57 -0700 |
---|---|---|
committer | Josh Blum | 2012-10-05 21:14:57 -0700 |
commit | 5b7a0489def5c41c6b1a1569d4dd259788097605 (patch) | |
tree | c942571534a1ea280f1f63e335b397e6da479610 /lib/block_task.cpp | |
parent | ef98a2b26fe4457df3bb2de96ea0177889fd220b (diff) | |
download | sandhi-5b7a0489def5c41c6b1a1569d4dd259788097605.tar.gz sandhi-5b7a0489def5c41c6b1a1569d4dd259788097605.tar.bz2 sandhi-5b7a0489def5c41c6b1a1569d4dd259788097605.zip |
cleanup task conclusion logic
Diffstat (limited to 'lib/block_task.cpp')
-rw-r--r-- | lib/block_task.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/block_task.cpp b/lib/block_task.cpp index a64b3d7..39b0327 100644 --- a/lib/block_task.cpp +++ b/lib/block_task.cpp @@ -167,12 +167,11 @@ void BlockActor::handle_task(void) num_output_items = num_output_items/2; //backoff regime if (num_output_items) goto forecast_again_you_jerk; - this->forecast_fail = true; - this->conclusion(); + //handle the case of forecast failing + this->mark_done(); return; } } - this->forecast_fail = false; //------------------------------------------------------------------ //-- the work @@ -239,17 +238,9 @@ void BlockActor::handle_task(void) //------------------------------------------------------------------ //-- Message self based on post-work conditions //------------------------------------------------------------------ - this->conclusion(); -} - -GRAS_FORCE_INLINE void BlockActor::conclusion(void) -{ //missing at least one upstream provider? //since nothing else is coming in, its safe to mark done - if (this->any_inputs_done() or this->forecast_fail) - { - this->mark_done(); - } + if (this->any_inputs_done()) this->mark_done(); //still have IO ready? kick off another task if (this->input_queues.all_ready() and this->output_queues.all_ready()) |