// @Author Lin Ya
// @Email [email protected]
#include "EventLoopThreadPool.h"
EventLoopThreadPool::EventLoopThreadPool(EventLoop *baseLoop, int numThreads)
: baseLoop_(baseLoop), started_(false), numThreads_(numThreads), next_(0) {
if (numThreads_ <= 0) {
LOG << "numThreads_ <= 0";
abort();
}
}
void EventLoopThreadPool::start() {
baseLoop_->assertInLoopThread();
started_ = true;
for (int i = 0; i < numThreads_; ++i) {
std::shared_ptr