//----------------------------------------------------------------------------- // 描述: 根据事件循环线程ID查找对应的事件循环,找不到返回NULL //----------------------------------------------------------------------------- EventLoop* EventLoopList::findEventLoop(THREAD_ID loopThreadId) { for (int i = 0; i < (int)items_.getCount(); ++i) { EventLoop *eventLoop = items_[i]; if (eventLoop->getLoopThreadId() == loopThreadId) return eventLoop; } return NULL; }