MCPcopy Create free account
hub / github.com/834810071/muduo_study / startLoop

Method startLoop

reactor/EventLoopThread.cpp:53–66  ·  view source on GitHub ↗

* 线程池所在线程在每创建一个EventLoopThread后会调用相应对象的startLoop函数,注意主线程和子线程之分 * 主线程是TcpServer所在线程,也是线程池所在线程 * 子线程是由线程池通过pthread_create创建的线程,每一个子线程运行一个EventLoop::loop * * 1.主线程EventLoopThreadPool创建EventLoopThread对象 * * 2.主线程EventLoopThread构造函数中初始化线程类Thread并传递回调函数EventLoopThread::threadFunc * * 3.主线程EventLoopThreadPool创建完EventLoopThread后,调用EventLoopThread::startLoop函数 * * 4.主线程EventLoopThread::startLoop函

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

startMethod · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 3

startedMethod · 0.80
startMethod · 0.45
waitMethod · 0.45

Tested by 3

mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64