From 37a863991f5e05035cce6738379de7a8ebc2b160 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Mon, 5 Nov 2012 22:59:47 -0800 Subject: polish up work and notify api There is a formal api to mark done, and IO failures. Notify topology was created for consistency. So far, there output fail is unimplemented, and input fail requires an additional check. --- lib/gras_impl/block_actor.hpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lib/gras_impl') diff --git a/lib/gras_impl/block_actor.hpp b/lib/gras_impl/block_actor.hpp index 18c13e2..67e1815 100644 --- a/lib/gras_impl/block_actor.hpp +++ b/lib/gras_impl/block_actor.hpp @@ -101,6 +101,7 @@ struct BlockActor : Apology::Worker void mark_done(void); void handle_task(void); void input_fail(const size_t index); + void output_fail(const size_t index); void sort_tags(const size_t index); void trim_tags(const size_t index); GRAS_FORCE_INLINE bool any_inputs_done(void) @@ -126,17 +127,9 @@ struct BlockActor : Apology::Worker std::vector items_consumed; std::vector items_produced; - //work buffers for the classic interface - size_t work_noutput_items; - std::vector work_input_items; - std::vector work_output_items; - std::vector work_ninput_items; - std::vector fcast_ninput_items; - //work buffers for the new work interface Block::InputItems input_items; Block::OutputItems output_items; - ptrdiff_t work_io_ptr_mask; //track work's calls to produce and consume std::vector produce_items; @@ -164,10 +157,9 @@ struct BlockActor : Apology::Worker boost::shared_ptr interruptible_thread; //work helpers - int work_ret; inline void task_work(void) { - this->work_ret = block_ptr->work(this->input_items, this->output_items); + block_ptr->work(this->input_items, this->output_items); } //is the fg running? -- cgit