From 5f108b510d99aee50766ff295177071305e04911 Mon Sep 17 00:00:00 2001 From: antao Date: Wed, 9 Jan 2019 16:23:34 +0800 Subject: [PATCH] Name threads --- lib/src/HttpAppFrameworkImpl.cc | 4 ++-- orm_lib/src/DbClientImpl.cc | 2 +- trantor | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/HttpAppFrameworkImpl.cc b/lib/src/HttpAppFrameworkImpl.cc index 6ff5b819..9029ba3b 100755 --- a/lib/src/HttpAppFrameworkImpl.cc +++ b/lib/src/HttpAppFrameworkImpl.cc @@ -419,7 +419,7 @@ void HttpAppFrameworkImpl::run() #ifdef __linux__ for (size_t i = 0; i < _threadNum; i++) { - auto loopThreadPtr = std::make_shared(); + auto loopThreadPtr = std::make_shared("DrogonIoLoop"); loopThreadPtr->run(); loopThreads.push_back(loopThreadPtr); auto serverPtr = std::make_shared(loopThreadPtr->getLoop(), @@ -449,7 +449,7 @@ void HttpAppFrameworkImpl::run() servers.push_back(serverPtr); } #else - auto loopThreadPtr = std::make_shared(); + auto loopThreadPtr = std::make_shared("DrogonIoLoop"); loopThreadPtr->run(); loopThreads.push_back(loopThreadPtr); auto serverPtr = std::make_shared(loopThreadPtr->getLoop(), diff --git a/orm_lib/src/DbClientImpl.cc b/orm_lib/src/DbClientImpl.cc index 2213f7e9..0a03e093 100644 --- a/orm_lib/src/DbClientImpl.cc +++ b/orm_lib/src/DbClientImpl.cc @@ -44,7 +44,7 @@ using namespace drogon::orm; DbClientImpl::DbClientImpl(const std::string &connInfo, const size_t connNum, ClientType type) : _connInfo(connInfo), _connectNum(connNum), - _loops(connNum / 100 > 0 ? connNum / 100 : 1) + _loops((connNum / 100 > 0 ? connNum / 100 : 1),"DbLoop") { _type = type; LOG_TRACE << "type=" << (int)type; diff --git a/trantor b/trantor index 12a3625b..2602ed13 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 12a3625bfa94f9f2465e8f1420fd895fb887636e +Subproject commit 2602ed13292876b463060f132ba0cf15804cf331