MCPcopy Create free account
hub / github.com/apache/brpc / DEFINE_SMALL_ARRAY

Function DEFINE_SMALL_ARRAY

src/brpc/stream.cpp:608–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606 return 0;
607 }
608 DEFINE_SMALL_ARRAY(butil::IOBuf*, buf_list, s->_options.messages_in_batch, 256);
609 MessageBatcher mb(buf_list, s->_options.messages_in_batch, s);
610 bool has_timeout_task = false;
611 for (; iter; ++iter) {
612 butil::IOBuf* t= *iter;
613 if (t == TIMEOUT_TASK) {
614 has_timeout_task = true;
615 } else {
616 if (s->_parse_rpc_response) {
617 s->_parse_rpc_response = false;
618 s->HandleRpcResponse(t);
619 } else {
620 mb.push(t);
621 }
622 }
623 }
624 if (s->_options.handler != NULL) {
625 if (has_timeout_task && mb.total_length() == 0) {
626 s->_options.handler->on_idle_timeout(s->id());

Callers

nothing calls this directly

Calls 2

HandleRpcResponseMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected