diff options
author | Josh Blum | 2013-03-11 00:43:43 -0700 |
---|---|---|
committer | Josh Blum | 2013-03-11 00:43:43 -0700 |
commit | 9ded08b79b35fdfd67ad4968121d282e6c3dccda (patch) | |
tree | c47ba09f6db23a6f7a07442ab56a9d7ad96ecc66 /lib/input_handlers.cpp | |
parent | 83d78cdcaefe18555e83dc7cc810422616054527 (diff) | |
download | sandhi-9ded08b79b35fdfd67ad4968121d282e6c3dccda.tar.gz sandhi-9ded08b79b35fdfd67ad4968121d282e6c3dccda.tar.bz2 sandhi-9ded08b79b35fdfd67ad4968121d282e6c3dccda.zip |
gras: separate queue for messages - #54
Diffstat (limited to 'lib/input_handlers.cpp')
-rw-r--r-- | lib/input_handlers.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp index 56ead46..e55f72e 100644 --- a/lib/input_handlers.cpp +++ b/lib/input_handlers.cpp @@ -13,11 +13,19 @@ void BlockActor::handle_input_tag(const InputTagMessage &message, const Theron:: //handle incoming stream tag, push into the tag storage this->input_tags[index].push_back(message.tag); + this->input_tags_changed[index] = true; +} - //Changed is a boolean to enable sorting of tags: If the offset is 0, there is nothing to sort, - //because tags are being used for message passing, or this is just the first tag in a stream. - this->input_tags_changed[index] = this->input_tags_changed[index] or message.tag.offset != 0; +void BlockActor::handle_input_msg(const InputMsgMessage &message, const Theron::Address) +{ + TimerAccumulate ta(this->stats.total_time_input); + MESSAGE_TRACER(); + const size_t index = message.index; + + //handle incoming async message, push into the msg storage + this->input_msgs[index].push_back(message.msg); this->inputs_available.set(index); + ta.done(); this->handle_task(); } |