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

Function main

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

Source from the content-addressed store, hash-verified

62};
63
64int main()
65{
66 std::unique_ptr<Printer> printer; // make sure printer lives longer than loops, to avoid
67 // race condition of calling print2() on destructed object.
68 muduo::net::EventLoop loop;
69 muduo::net::EventLoopThread loopThread;
70 muduo::net::EventLoop* loopInAnotherThread = loopThread.startLoop();
71 printer.reset(new Printer(&loop, loopInAnotherThread));
72 loop.loop();
73}
74

Callers

nothing calls this directly

Calls 3

startLoopMethod · 0.80
loopMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected