summaryrefslogtreecommitdiff
path: root/lib/block_handlers.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-08-31 01:18:45 -0700
committerJosh Blum2012-08-31 01:18:45 -0700
commite09df5e1170d4282d89e7b62cc75baa311c18da9 (patch)
tree3d08cc7cd233eb2da94acdaa517b761ddf93f1c2 /lib/block_handlers.cpp
parenta648f0970230203f05a434dba903e6a4a5a08d53 (diff)
downloadsandhi-e09df5e1170d4282d89e7b62cc75baa311c18da9.tar.gz
sandhi-e09df5e1170d4282d89e7b62cc75baa311c18da9.tar.bz2
sandhi-e09df5e1170d4282d89e7b62cc75baa311c18da9.zip
done logic tweaks, comments, cleanup
Diffstat (limited to 'lib/block_handlers.cpp')
-rw-r--r--lib/block_handlers.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp
index 4630d05..b9bae2b 100644
--- a/lib/block_handlers.cpp
+++ b/lib/block_handlers.cpp
@@ -26,13 +26,14 @@ void ElementImpl::handle_block_msg(const tsbe::TaskInterface &task_iface, const
if (msg.type() == typeid(BufferReturnMessage))
{
const BufferReturnMessage &message = msg.cast<BufferReturnMessage>();
- this->handle_output_msg(task_iface, message.index, message.buffer);
+ const size_t index = message.index;
+ if (this->block_state == BLOCK_STATE_DONE) return;
+ this->output_queues[index].push(message.buffer);
+ this->outputs_ready.set(index, true);
+ this->handle_task(task_iface);
return;
}
- //TODO: generate a message to handle task in a loop for a while
- //we may need to call it into exhaustion to be correct
- //but dont call it from update, let the settings above sink in
if (msg.type() == typeid(SelfKickMessage))
{
this->handle_task(task_iface);