Fix a error in setThreadNum method (#263)
This commit is contained in:
parent
56b9a320b5
commit
5605d7d351
|
@ -225,7 +225,11 @@ void HttpAppFrameworkImpl::registerHttpController(
|
||||||
}
|
}
|
||||||
HttpAppFramework &HttpAppFrameworkImpl::setThreadNum(size_t threadNum)
|
HttpAppFramework &HttpAppFrameworkImpl::setThreadNum(size_t threadNum)
|
||||||
{
|
{
|
||||||
assert(threadNum >= 1);
|
if (threadNum == 0)
|
||||||
|
{
|
||||||
|
_threadNum = std::thread::hardware_concurrency();
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
_threadNum = threadNum;
|
_threadNum = threadNum;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue