diff options
author | Josh Blum | 2012-11-13 20:52:53 -0800 |
---|---|---|
committer | Josh Blum | 2012-11-13 20:52:53 -0800 |
commit | 8b714226a0c73ccb458707126d73bae752186db6 (patch) | |
tree | a2d70316dd0cfe319ee75e8bae63924c9b86a6ff /lib/block_task.cpp | |
parent | e6c5ccd5190917adcb3518add8a2dc7599bd86f1 (diff) | |
download | sandhi-8b714226a0c73ccb458707126d73bae752186db6.tar.gz sandhi-8b714226a0c73ccb458707126d73bae752186db6.tar.bz2 sandhi-8b714226a0c73ccb458707126d73bae752186db6.zip |
created API for passive work-flow
Diffstat (limited to 'lib/block_task.cpp')
-rw-r--r-- | lib/block_task.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/block_task.cpp b/lib/block_task.cpp index 5e1db89..d3e12f6 100644 --- a/lib/block_task.cpp +++ b/lib/block_task.cpp @@ -233,3 +233,12 @@ void BlockActor::produce(const size_t i, const size_t items) const size_t bytes = items*this->output_items_sizes[i]; buff.length += bytes; } + +void BlockActor::produce_buffer(const size_t i, const SBuffer &buffer) +{ + const size_t items = buffer.length/output_items_sizes[i]; + this->items_produced[i] += items; + InputBufferMessage buff_msg; + buff_msg.buffer = buffer; + this->post_downstream(i, buff_msg); +} |