Skip to content

Commit

Permalink
fix pool dcheck failed
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbo committed Jan 6, 2025
1 parent 177a52f commit 6318872
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions be/src/util/threadpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,12 @@ Status ThreadPool::init() {
}
_pool_status = Status::OK();

// create thread failed should not cause threadpool init failed,
// because thread can be created later such as when submit a task.
static_cast<void>(try_create_thread(_min_threads));
{
std::lock_guard<std::mutex> l(_lock);
// create thread failed should not cause threadpool init failed,
// because thread can be created later such as when submit a task.
static_cast<void>(try_create_thread(_min_threads));
}

// _id of thread pool is used to make sure when we create thread pool with same name, we can
// get different _metric_entity
Expand Down

0 comments on commit 6318872

Please sign in to comment.