diff options
author | sskvor <sskvor@yandex-team.ru> | 2022-02-10 16:48:04 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:04 +0300 |
commit | 75abffb472365d28bd0a019db1a54cb32a6100dd (patch) | |
tree | 09a7f042da3da3e074e6dd6f7e5305a92eb2321a /library/cpp/http/server/http.cpp | |
parent | b228f91bb45c3cb95fcd861c424bb3de0fd356f2 (diff) | |
download | ydb-75abffb472365d28bd0a019db1a54cb32a6100dd.tar.gz |
Restoring authorship annotation for <sskvor@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server/http.cpp')
-rw-r--r-- | library/cpp/http/server/http.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp index 128583bdd70..978847d5ca4 100644 --- a/library/cpp/http/server/http.cpp +++ b/library/cpp/http/server/http.cpp @@ -2,7 +2,7 @@ #include "http_ex.h" #include <library/cpp/threading/equeue/equeue.h> - + #include <util/generic/buffer.h> #include <util/generic/cast.h> #include <util/generic/intrlist.h> @@ -458,8 +458,8 @@ public: THttpServer* Parent_ = nullptr; TWakeupPollAble WakeupPollAble; TMutex StopMutex; - -private: + +private: template <class TThreadPool_> static THolder<IThreadPool> MakeThreadPool(IThreadFactory* factory, bool elastic, ICallBack* callback = nullptr, const TString& threadName = {}) { if (!factory) { @@ -470,20 +470,20 @@ private: const auto params = IThreadPool::TParams().SetFactory(factory).SetThreadName(threadName); if (callback) { pool = MakeHolder<TThreadPoolBinder<TThreadPool_, THttpServer::ICallBack>>(callback, params); - } else { + } else { pool = MakeHolder<TThreadPool_>(params); - } - - if (elastic) { + } + + if (elastic) { pool = MakeHolder<TElasticQueue>(std::move(pool)); - } + } return pool; - } + } }; -THttpServer::THttpServer(ICallBack* cb, const TOptions& options, IThreadFactory* pool) - : Impl_(new TImpl(this, cb, options, pool)) +THttpServer::THttpServer(ICallBack* cb, const TOptions& options, IThreadFactory* pool) + : Impl_(new TImpl(this, cb, options, pool)) { } |