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

Function main

examples/asio/tutorial/timer6/timer.cc:104–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102};
103
104int main()
105{
106 std::unique_ptr<Printer> printer; // make sure printer lives longer than loops, to avoid
107 // race condition of calling print2() on destructed object.
108 muduo::net::EventLoop loop;
109 muduo::net::EventLoopThread loopThread;
110 muduo::net::EventLoop* loopInAnotherThread = loopThread.startLoop();
111 printer.reset(new Printer(&loop, loopInAnotherThread));
112 loop.loop();
113}
114

Callers

nothing calls this directly

Calls 3

startLoopMethod · 0.80
loopMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected