summaryrefslogtreecommitdiff
path: root/lib/block_task.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-12-16 11:41:26 -0800
committerJosh Blum2012-12-16 11:41:26 -0800
commit540c2343a44b823c0060ab9ab1bdc4d55f01e66d (patch)
tree9f185ef9ec32ada678a878a895f5a6588936af7e /lib/block_task.cpp
parent0865d999f90755cf624f1b4798d74c0376048989 (diff)
downloadsandhi-540c2343a44b823c0060ab9ab1bdc4d55f01e66d.tar.gz
sandhi-540c2343a44b823c0060ab9ab1bdc4d55f01e66d.tar.bz2
sandhi-540c2343a44b823c0060ab9ab1bdc4d55f01e66d.zip
work ont he circ buffer impl
Diffstat (limited to 'lib/block_task.cpp')
-rw-r--r--lib/block_task.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/block_task.cpp b/lib/block_task.cpp
index efdc574..c84f702 100644
--- a/lib/block_task.cpp
+++ b/lib/block_task.cpp
@@ -94,6 +94,9 @@ void BlockActor::output_fail(const size_t i)
//force pop so next work() gets a new buffer
this->flush_output(i, true);
+
+ //mark fail: not ready until a new buffer appears
+ this->output_queues.fail(i);
}
GRAS_FORCE_INLINE bool BlockActor::is_work_allowed(void)
@@ -264,7 +267,7 @@ void BlockActor::produce_buffer(const size_t i, const SBuffer &buffer)
GRAS_FORCE_INLINE void BlockActor::flush_output(const size_t i, const bool force_pop)
{
- if (not this->output_queues.ready(i) or this->output_queues.front(i).length == 0) return;
+ if (this->output_queues.empty(i) or this->output_queues.front(i).length == 0) return;
SBuffer &buff = this->output_queues.front(i);
InputBufferMessage buff_msg;
buff_msg.buffer = buff;