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

Method getLoopForHash

muduo/net/EventLoopThreadPool.cc:73–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73EventLoop* EventLoopThreadPool::getLoopForHash(size_t hashCode)
74{
75 baseLoop_->assertInLoopThread();
76 EventLoop* loop = baseLoop_;
77
78 if (!loops_.empty())
79 {
80 loop = loops_[hashCode % loops_.size()];
81 }
82 return loop;
83}
84
85std::vector<EventLoop*> EventLoopThreadPool::getAllLoops()
86{

Callers

nothing calls this directly

Calls 3

assertInLoopThreadMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected