summaryrefslogtreecommitdiff
path: root/lib/gras_impl/block_actor.hpp
diff options
context:
space:
mode:
authorJosh Blum2013-01-31 22:38:27 -0800
committerJosh Blum2013-01-31 22:38:27 -0800
commit6943a8555fb59004e9197513c5bcb23792c1a1e9 (patch)
tree885fbfcf11be3ce6dd59937ebff61e9697b86ebd /lib/gras_impl/block_actor.hpp
parente21fdd0deb76471fa35c95bdc5c78a5ce85f7602 (diff)
downloadsandhi-6943a8555fb59004e9197513c5bcb23792c1a1e9.tar.gz
sandhi-6943a8555fb59004e9197513c5bcb23792c1a1e9.tar.bz2
sandhi-6943a8555fb59004e9197513c5bcb23792c1a1e9.zip
gras: why/how did this link on the other machine
Diffstat (limited to 'lib/gras_impl/block_actor.hpp')
-rw-r--r--lib/gras_impl/block_actor.hpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp
index 7e9dd6b..5ca5cb0 100644
--- a/lib/gras_impl/block_actor.hpp
+++ b/lib/gras_impl/block_actor.hpp
@@ -96,7 +96,6 @@ struct BlockActor : Apology::Worker
void consume(const size_t index, const size_t items);
void produce_buffer(const size_t index, const SBuffer &buffer);
void flush_output(const size_t index);
- bool is_work_allowed(void);
GRAS_FORCE_INLINE void task_kicker(void)
{
@@ -109,6 +108,16 @@ struct BlockActor : Apology::Worker
return this->inputs_done[i] and not available;
}
+ GRAS_FORCE_INLINE bool is_work_allowed(void)
+ {
+ return (
+ this->block_state == BLOCK_STATE_LIVE and
+ this->input_queues.all_ready() and
+ this->inputs_available.any() and
+ this->output_queues.all_ready()
+ );
+ }
+
//per port properties
std::vector<size_t> input_items_sizes;
std::vector<size_t> output_items_sizes;