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
commitc2a1af049e9deca890e9923abe64fe6c59060348 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/http/server/http.cpp
parent1f553f46fb4f3c5eec631352cdd900a0709016af (diff)
downloadydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 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 4ef72ad921..128583bdd7 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;