Added default thread number config value for AsyncHttpConnectionHandler

This commit is contained in:
lganzzzo 2018-09-28 10:06:38 +03:00
parent c18230a776
commit b1147b5c5b
2 changed files with 9 additions and 1 deletions

View File

@ -56,6 +56,13 @@
#define OATPP_THREAD_DISTRIBUTED_MEM_POOL_SHARDS_COUNT 10
#endif
/**
* AsyncHttpConnectionHandler default number of threads
*/
#ifndef OATPP_ASYNC_HTTP_CONNECTION_HANDLER_THREAD_NUM_DEFAULT
#define OATPP_ASYNC_HTTP_CONNECTION_HANDLER_THREAD_NUM_DEFAULT 2
#endif
/**
* DISABLE logs level V
*/

View File

@ -101,7 +101,8 @@ private:
v_int32 m_threadCount;
std::shared_ptr<Task>* m_tasks;
public:
AsyncHttpConnectionHandler(const std::shared_ptr<HttpRouter>& router, v_int32 threadCount = 2)
AsyncHttpConnectionHandler(const std::shared_ptr<HttpRouter>& router,
v_int32 threadCount = OATPP_ASYNC_HTTP_CONNECTION_HANDLER_THREAD_NUM_DEFAULT)
: m_router(router)
, m_errorHandler(handler::DefaultErrorHandler::createShared())
, m_taskBalancer(0)