enhance: Set thread name for segcore thread pool (#42017)

Thread name could be helpful when debugging thread explosion issues

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-05-22 19:06:27 +08:00 committed by GitHub
parent c937da5234
commit 9fb0257bfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,6 +15,7 @@
// limitations under the License.
#include "ThreadPool.h"
#include "log/Log.h"
namespace milvus {
@ -65,6 +66,7 @@ void
ThreadPool::Worker() {
std::function<void()> func;
bool dequeue;
SetThreadName(name_);
while (!shutdown_) {
std::unique_lock<std::mutex> lock(mutex_);
idle_threads_size_++;