diff options
author | Josh Blum | 2013-06-20 19:48:29 -0700 |
---|---|---|
committer | Josh Blum | 2013-06-20 19:48:29 -0700 |
commit | 37bd56f3301795e89294c048883324b0353237ef (patch) | |
tree | 77d1a9066c0f416c6758eab154dcf2706e197595 /lib/gras_impl/block_actor.hpp | |
parent | 630a272e6725a547327366e543106e63c23fd816 (diff) | |
download | sandhi-37bd56f3301795e89294c048883324b0353237ef.tar.gz sandhi-37bd56f3301795e89294c048883324b0353237ef.tar.bz2 sandhi-37bd56f3301795e89294c048883324b0353237ef.zip |
gras: work on goddamn done logic
How blocks mark themselves done has been one of the most annoying things in this development.
This done logic is only valuable for QA tests, it doesnt even exist in the practical use case.
How it works now:
* blocks mark done when sync inputs are done or all inputs are done
* removed the force_done input config, its no longer needed
* the wait() implementation gives blocks a grace period between
an input becoming done and the block itself becoming done.
After the grace period, the block is forced done.
Diffstat (limited to 'lib/gras_impl/block_actor.hpp')
-rw-r--r-- | lib/gras_impl/block_actor.hpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 8c9fdf4..840e8c2 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -95,7 +95,6 @@ struct BlockActor : Theron::Actor void consume(const size_t index, const size_t items); void task_kicker(void); void update_input_avail(const size_t index); - bool is_input_done(const size_t index); bool is_work_allowed(void); //work helpers @@ -123,13 +122,6 @@ GRAS_FORCE_INLINE void BlockActor::update_input_avail(const size_t i) data->input_queues.update_has_msg(i, has_input_msgs); } -GRAS_FORCE_INLINE bool BlockActor::is_input_done(const size_t i) -{ - const bool force_done = data->input_configs[i].force_done; - if GRAS_LIKELY(force_done) return data->inputs_done[i] and not data->inputs_available[i]; - return data->inputs_done.all() and data->inputs_available.none(); -} - GRAS_FORCE_INLINE bool BlockActor::is_work_allowed(void) { return ( |