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

Method AddCallback

test/callback_list_unittest.cc:58–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 cb_reg_(cb_reg) {
57 }
58 void AddCallback() {
59 if (!added_) {
60 added_ = true;
61 subscription_ =
62 cb_reg_->Add(Bind(&Adder::IncrementTotal, Unretained(this)));
63 }
64 }
65 void IncrementTotal() { total_++; }
66
67 bool added() const { return added_; }

Callers

nothing calls this directly

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected