diff options
-rw-r--r-- | lib/input_handlers.cpp | 6 | ||||
-rw-r--r-- | lib/output_handlers.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/input_handlers.cpp b/lib/input_handlers.cpp index c82efb3..c9855ec 100644 --- a/lib/input_handlers.cpp +++ b/lib/input_handlers.cpp @@ -12,7 +12,7 @@ void BlockActor::handle_input_tag(const InputTagMessage &message, const Theron:: const size_t index = message.index; //handle incoming stream tag, push into the tag storage - if (this->block_state == BLOCK_STATE_DONE) return; + if GRAS_UNLIKELY(this->block_state == BLOCK_STATE_DONE) return; this->input_tags[index].push_back(message.tag); this->input_tags_changed[index] = true; } @@ -24,7 +24,7 @@ void BlockActor::handle_input_msg(const InputMsgMessage &message, const Theron:: const size_t index = message.index; //handle incoming async message, push into the msg storage - if (this->block_state == BLOCK_STATE_DONE) return; + if GRAS_UNLIKELY(this->block_state == BLOCK_STATE_DONE) return; this->input_msgs[index].push_back(message.msg); this->update_input_avail(index); @@ -39,7 +39,7 @@ void BlockActor::handle_input_buffer(const InputBufferMessage &message, const Th const size_t index = message.index; //handle incoming stream buffer, push into the queue - if (this->block_state == BLOCK_STATE_DONE) return; + if GRAS_UNLIKELY(this->block_state == BLOCK_STATE_DONE) return; this->input_queues.push(index, message.buffer); this->update_input_avail(index); diff --git a/lib/output_handlers.cpp b/lib/output_handlers.cpp index 17244ee..e0c3a52 100644 --- a/lib/output_handlers.cpp +++ b/lib/output_handlers.cpp @@ -14,7 +14,7 @@ void BlockActor::handle_output_buffer(const OutputBufferMessage &message, const //a buffer has returned from the downstream //(all interested consumers have finished with it) - if (this->block_state == BLOCK_STATE_DONE) return; + if GRAS_UNLIKELY(this->block_state == BLOCK_STATE_DONE) return; this->output_queues.push(index, message.buffer); ta.done(); |