mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
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:
parent
c937da5234
commit
9fb0257bfa
@ -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_++;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user