diff options
author | sskvor <[email protected]> | 2022-02-10 16:48:04 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:48:04 +0300 |
commit | 10ade5dcb952a8fae61f734485641a8409e1c545 (patch) | |
tree | b222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/http/server/http.cpp | |
parent | 75abffb472365d28bd0a019db1a54cb32a6100dd (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 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 978847d5ca4..128583bdd70 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)) { } |