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

Class SlowDelegate

test/lazy_instance_unittest.cc:44–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42int SlowConstructor::constructed = 0;
43
44class SlowDelegate : public butil::DelegateSimpleThread::Delegate {
45 public:
46 explicit SlowDelegate(butil::LazyInstance<SlowConstructor>* lazy)
47 : lazy_(lazy) {}
48
49 virtual void Run() OVERRIDE {
50 EXPECT_EQ(12, lazy_->Get().some_int());
51 EXPECT_EQ(12, lazy_->Pointer()->some_int());
52 }
53
54 private:
55 butil::LazyInstance<SlowConstructor>* lazy_;
56};
57
58} // namespace
59

Callers

nothing calls this directly

Calls 3

some_intMethod · 0.80
PointerMethod · 0.80
GetMethod · 0.45

Tested by

no test coverage detected