mirror of
https://gitee.com/an-tao/drogon.git
synced 2024-12-03 12:18:11 +08:00
Modify the number of event loops in the DbClientImpl class
This commit is contained in:
parent
13417edf10
commit
1600cb98fe
@ -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(type == ClientType::Sqlite3 ? 1 : (connNum / 100 > 0 ? connNum / 100 : 1), "DbLoop")
|
||||
_loops(type == ClientType::Sqlite3 ? 1 : (connNum < std::thread::hardware_concurrency() ? connNum : std::thread::hardware_concurrency()), "DbLoop")
|
||||
{
|
||||
_type = type;
|
||||
LOG_TRACE << "type=" << (int)type;
|
||||
|
Loading…
Reference in New Issue
Block a user