mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Try to fix race in PipelineExecutor.
This commit is contained in:
parent
423a5c35e8
commit
eeba24b238
@ -498,8 +498,8 @@ void PipelineExecutor::executeSingleThread(size_t thread_num, size_t num_threads
|
||||
|
||||
if (!task_queue.empty() && !threads_queue.empty())
|
||||
{
|
||||
auto thread_to_wake = threads_queue.top();
|
||||
threads_queue.pop();
|
||||
auto thread_to_wake = *threads_queue.begin();
|
||||
threads_queue.erase(threads_queue.begin());
|
||||
--num_waiting_threads;
|
||||
lock.unlock();
|
||||
|
||||
@ -520,7 +520,7 @@ void PipelineExecutor::executeSingleThread(size_t thread_num, size_t num_threads
|
||||
break;
|
||||
}
|
||||
|
||||
threads_queue.push(thread_num);
|
||||
threads_queue.insert(thread_num);
|
||||
}
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user