From e93c4eee812900480b5b2a8c7deab77417cdf448 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 31 Mar 2013 20:41:04 -0700 Subject: gras: fix #60 by checking done logic after handler --- lib/gras_impl/block_actor.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/gras_impl') diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 9006d6e..e620d77 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -130,6 +130,13 @@ struct BlockActor : Apology::Worker if (this->is_work_allowed()) this->Send(SelfKickMessage(), this->GetAddress()); } + GRAS_FORCE_INLINE void update_input_avail(const size_t i) + { + const bool has_input_bufs = not this->input_queues.empty(i) and this->input_queues.ready(i); + const bool has_input_msgs = not this->input_msgs[i].empty(); + this->inputs_available.set(i, has_input_bufs or has_input_msgs); + } + GRAS_FORCE_INLINE bool is_input_done(const size_t i) { return this->inputs_done[i] and not this->inputs_available[i]; -- cgit