MCPcopy Create free account
hub / github.com/chenshuo/muduo / print2

Method print2

examples/asio/tutorial/timer5/timer.cc:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 void print2()
41 {
42 muduo::MutexLockGuard lock(mutex_);
43 if (count_ < 10)
44 {
45 std::cout << "Timer 2: " << count_ << "\n";
46 ++count_;
47
48 loop2_->runAfter(1, std::bind(&Printer::print2, this));
49 }
50 else
51 {
52 loop2_->quit();
53 }
54 }
55
56private:
57

Callers

nothing calls this directly

Calls 2

runAfterMethod · 0.80
quitMethod · 0.45

Tested by

no test coverage detected