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

Method SubController

src/brpc/selective_channel.cpp:481–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481inline const Controller* Sender::SubController(int index) const {
482 if (index != 0) {
483 return NULL;
484 }
485 for (int i = 0; i < _nfree; ++i) {
486 if (!_free_resources[i].sub_done->_cntl.Failed()) {
487 return &_free_resources[i].sub_done->_cntl;
488 }
489 }
490 if (_nfree != 0) {
491 return &_free_resources[_nfree - 1].sub_done->_cntl;
492 }
493 return NULL;
494}
495
496} // namespace schan
497

Callers 1

Calls 1

FailedMethod · 0.45

Tested by

no test coverage detected