aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http
diff options
context:
space:
mode:
authorv01d <v01d@yandex-team.ru>2022-02-10 16:49:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:40 +0300
commitfa8b0420162dd36d4f569fdc3f63da0bef8bb8c7 (patch)
treeecec7ec14d9261b76724eeb69ab158c45a970dc4 /library/cpp/http
parentac559bd4bb6b11b17dce999cf58c05e08f6087a2 (diff)
downloadydb-fa8b0420162dd36d4f569fdc3f63da0bef8bb8c7.tar.gz
Restoring authorship annotation for <v01d@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http')
-rw-r--r--library/cpp/http/server/http.cpp54
-rw-r--r--library/cpp/http/server/http.h6
2 files changed, 30 insertions, 30 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();
}
diff --git a/library/cpp/http/server/http.h b/library/cpp/http/server/http.h
index b292d38f27..3ada28155e 100644
--- a/library/cpp/http/server/http.h
+++ b/library/cpp/http/server/http.h
@@ -87,9 +87,9 @@ public:
size_t GetRequestQueueSize() const;
size_t GetFailQueueSize() const;
- const IThreadPool& GetRequestQueue() const;
- const IThreadPool& GetFailQueue() const;
-
+ const IThreadPool& GetRequestQueue() const;
+ const IThreadPool& GetFailQueue() const;
+
static TAtomicBase AcceptReturnsInvalidSocketCounter();
private: