diff options
author | v01d <v01d@yandex-team.ru> | 2022-02-10 16:49:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:40 +0300 |
commit | fa8b0420162dd36d4f569fdc3f63da0bef8bb8c7 (patch) | |
tree | ecec7ec14d9261b76724eeb69ab158c45a970dc4 /library/cpp/http/server/http.cpp | |
parent | ac559bd4bb6b11b17dce999cf58c05e08f6087a2 (diff) | |
download | ydb-fa8b0420162dd36d4f569fdc3f63da0bef8bb8c7.tar.gz |
Restoring authorship annotation for <v01d@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 | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp index 128583bdd7..c2975400f5 100644 --- a/library/cpp/http/server/http.cpp +++ b/library/cpp/http/server/http.cpp @@ -280,14 +280,14 @@ public: return FailRequests->Size(); } - const IThreadPool& GetRequestQueue() const { - return *Requests; - } - - const IThreadPool& GetFailQueue() const { - return *FailRequests; - } - + const IThreadPool& GetRequestQueue() const { + return *Requests; + } + + const IThreadPool& GetFailQueue() const { + return *FailRequests; + } + class TListenSocket: public IPollAble, public TIntrusiveListItem<TListenSocket> { public: inline TListenSocket(const TSocket& s, TImpl* parent) @@ -406,7 +406,7 @@ public: { } - TImpl(THttpServer* parent, ICallBack* cb, const TOptions& options, IThreadFactory* factory) + TImpl(THttpServer* parent, ICallBack* cb, const TOptions& options, IThreadFactory* factory) : TImpl( parent, cb, @@ -460,25 +460,25 @@ public: TMutex StopMutex; private: - template <class TThreadPool_> + template <class TThreadPool_> static THolder<IThreadPool> MakeThreadPool(IThreadFactory* factory, bool elastic, ICallBack* callback = nullptr, const TString& threadName = {}) { - if (!factory) { - factory = SystemThreadFactory(); - } - - THolder<IThreadPool> pool; + if (!factory) { + factory = SystemThreadFactory(); + } + + THolder<IThreadPool> pool; const auto params = IThreadPool::TParams().SetFactory(factory).SetThreadName(threadName); - if (callback) { + if (callback) { pool = MakeHolder<TThreadPoolBinder<TThreadPool_, THttpServer::ICallBack>>(callback, params); } else { pool = MakeHolder<TThreadPool_>(params); } if (elastic) { - pool = MakeHolder<TElasticQueue>(std::move(pool)); + pool = MakeHolder<TElasticQueue>(std::move(pool)); } - - return pool; + + return pool; } }; @@ -539,14 +539,14 @@ size_t THttpServer::GetFailQueueSize() const { return Impl_->GetFailQueueSize(); } -const IThreadPool& THttpServer::GetRequestQueue() const { - return Impl_->GetRequestQueue(); -} - -const IThreadPool& THttpServer::GetFailQueue() const { - return Impl_->GetFailQueue(); -} - +const IThreadPool& THttpServer::GetRequestQueue() const { + return Impl_->GetRequestQueue(); +} + +const IThreadPool& THttpServer::GetFailQueue() const { + return Impl_->GetFailQueue(); +} + bool THttpServer::MaxRequestsReached() const { return Impl_->MaxRequestsReached(); } |