aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http
diff options
context:
space:
mode:
authorsskvor <sskvor@yandex-team.ru>2022-02-10 16:48:04 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:04 +0300
commit75abffb472365d28bd0a019db1a54cb32a6100dd (patch)
tree09a7f042da3da3e074e6dd6f7e5305a92eb2321a /library/cpp/http
parentb228f91bb45c3cb95fcd861c424bb3de0fd356f2 (diff)
downloadydb-75abffb472365d28bd0a019db1a54cb32a6100dd.tar.gz
Restoring authorship annotation for <sskvor@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http')
-rw-r--r--library/cpp/http/server/http.cpp22
-rw-r--r--library/cpp/http/server/http.h2
-rw-r--r--library/cpp/http/server/options.h16
3 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp
index 128583bdd7..978847d5ca 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))
{
}
diff --git a/library/cpp/http/server/http.h b/library/cpp/http/server/http.h
index b292d38f27..79e8754a0c 100644
--- a/library/cpp/http/server/http.h
+++ b/library/cpp/http/server/http.h
@@ -64,7 +64,7 @@ public:
typedef THttpServerOptions TOptions;
typedef TSimpleSharedPtr<IThreadPool> TMtpQueueRef;
- THttpServer(ICallBack* cb, const TOptions& options = TOptions(), IThreadFactory* pool = nullptr);
+ THttpServer(ICallBack* cb, const TOptions& options = TOptions(), IThreadFactory* pool = nullptr);
THttpServer(ICallBack* cb, TMtpQueueRef mainWorkers, TMtpQueueRef failWorkers, const TOptions& options = TOptions());
virtual ~THttpServer();
diff --git a/library/cpp/http/server/options.h b/library/cpp/http/server/options.h
index 38eda0e5e7..5d35eddf5d 100644
--- a/library/cpp/http/server/options.h
+++ b/library/cpp/http/server/options.h
@@ -124,13 +124,13 @@ public:
return *this;
}
- /// Use TElasticQueue instead of TThreadPool for request queues
- inline THttpServerOptions& EnableElasticQueues(bool enable) noexcept {
- UseElasticQueues = enable;
-
- return *this;
- }
-
+ /// Use TElasticQueue instead of TThreadPool for request queues
+ inline THttpServerOptions& EnableElasticQueues(bool enable) noexcept {
+ UseElasticQueues = enable;
+
+ return *this;
+ }
+
inline THttpServerOptions& SetThreadsName(const TString& listenThreadName, const TString& requestsThreadName, const TString& failRequestsThreadName) noexcept {
ListenThreadName = listenThreadName;
RequestsThreadName = requestsThreadName;
@@ -165,7 +165,7 @@ public:
size_t OutputBufferSize = 0;
ui64 MaxInputContentLength = sizeof(size_t) <= 4 ? 2_GB : 64_GB;
size_t MaxRequestsPerConnection = 0; // If keep-alive is enabled, request limit before connection is closed
- bool UseElasticQueues = false;
+ bool UseElasticQueues = false;
TDuration PollTimeout; // timeout of TSocketPoller::WaitT call
TDuration ExpirationTimeout; // drop inactive connections after ExpirationTimeout (should be > 0)