aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/http.cpp
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commit1f553f46fb4f3c5eec631352cdd900a0709016af (patch)
treea231fba2c03b440becaea6c86a2702d0bfb0336e /library/cpp/http/server/http.cpp
parentc4de7efdedc25b49cbea74bd589eecb61b55b60a (diff)
downloadydb-1f553f46fb4f3c5eec631352cdd900a0709016af.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/http/server/http.cpp')
-rw-r--r--library/cpp/http/server/http.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp
index 128583bdd7..4ef72ad921 100644
--- a/library/cpp/http/server/http.cpp
+++ b/library/cpp/http/server/http.cpp
@@ -42,7 +42,7 @@ namespace {
struct TShouldStop {
};
-
+
struct TWakeupPollAble: public IPollAble {
void OnPollEvent(TInstant) override {
throw TShouldStop();
@@ -187,14 +187,14 @@ public:
// Start the listener thread
ListenerRunningOK = false;
- // throws on error
- TPipeHandle::Pipe(ListenWakeupReadFd, ListenWakeupWriteFd);
-
- SetNonBlock(ListenWakeupWriteFd, true);
- SetNonBlock(ListenWakeupReadFd, true);
-
- Poller->WaitRead(ListenWakeupReadFd, &WakeupPollAble);
-
+ // throws on error
+ TPipeHandle::Pipe(ListenWakeupReadFd, ListenWakeupWriteFd);
+
+ SetNonBlock(ListenWakeupWriteFd, true);
+ SetNonBlock(ListenWakeupReadFd, true);
+
+ Poller->WaitRead(ListenWakeupReadFd, &WakeupPollAble);
+
ListenStartEvent.Reset();
try {
ListenThread.Reset(new TThread(ListenSocketFunction, this));
@@ -220,8 +220,8 @@ public:
}
void Stop() {
- Shutdown();
-
+ Shutdown();
+
TGuard<TMutex> g(StopMutex);
if (ListenThread) {
ListenThread->Join();
@@ -238,8 +238,8 @@ public:
}
void Shutdown() {
- ListenWakeupWriteFd.Write("", 1);
- // ignore result
+ ListenWakeupWriteFd.Write("", 1);
+ // ignore result
}
void AddRequest(TAutoPtr<TClientRequest> req, bool fail) {
@@ -443,8 +443,8 @@ public:
}
THolder<TThread> ListenThread;
- TPipeHandle ListenWakeupReadFd;
- TPipeHandle ListenWakeupWriteFd;
+ TPipeHandle ListenWakeupReadFd;
+ TPipeHandle ListenWakeupWriteFd;
TSystemEvent ListenStartEvent;
TMtpQueueRef Requests;
TMtpQueueRef FailRequests;