aceld / Lars

负载均衡远程服务调度系统
MIT License
186 stars 55 forks source link

thread_pool::get_thread() #2

Open Hz188 opened 1 year ago

Hz188 commented 1 year ago
thread_queue<task_msg>* thread_pool::get_thread(){
    if(_index == _thread_cnt) {
        _index = 0;
    }

    return _queues[_index];
}

刘老师您好,这里我们获取线程池中的队列的时候_index是否应该++? 源代码中_index好像没有在任何地方进行更新,所以每次取的都是_queue[0]了

MrWnag commented 1 year ago

您好,您的邮件我已经收到了,如果是重要的事情请在通过其他的方式通知一下我!谢谢!