aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/dns/thread.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/dns/thread.cpp
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/dns/thread.cpp')
-rw-r--r--library/cpp/dns/thread.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/dns/thread.cpp b/library/cpp/dns/thread.cpp
index 8b27d2d527..a8441d7c90 100644
--- a/library/cpp/dns/thread.cpp
+++ b/library/cpp/dns/thread.cpp
@@ -14,7 +14,7 @@ using namespace NDns;
namespace {
class TThreadedResolver: public IThreadFactory::IThreadAble, public TNonCopyable {
struct TResolveRequest {
- inline TResolveRequest(const TString& host, ui16 port)
+ inline TResolveRequest(const TString& host, ui16 port)
: Host(host)
, Port(port)
{
@@ -36,7 +36,7 @@ namespace {
ythrow TNetworkResolutionError(EAI_FAIL) << TStringBuf(": shit happen");
}
- inline void Resolve() noexcept {
+ inline void Resolve() noexcept {
try {
Result = new TNetworkAddress(Host, Port);
} catch (...) {
@@ -46,11 +46,11 @@ namespace {
Wake();
}
- inline void Wake() noexcept {
+ inline void Wake() noexcept {
E.Signal();
}
- TString Host;
+ TString Host;
ui16 Port;
TManualEvent E;
TNetworkAddressPtr Result;
@@ -64,7 +64,7 @@ namespace {
T_.push_back(SystemThreadFactory()->Run(this));
}
- inline ~TThreadedResolver() override {
+ inline ~TThreadedResolver() override {
Schedule(nullptr);
for (size_t i = 0; i < T_.size(); ++i) {
@@ -86,7 +86,7 @@ namespace {
return Singleton<TThreadedResolver>();
}
- inline TNetworkAddressPtr Resolve(const TString& host, ui16 port) {
+ inline TNetworkAddressPtr Resolve(const TString& host, ui16 port) {
TResolveRequest rr(host, port);
Schedule(&rr);
@@ -122,12 +122,12 @@ namespace {
TLockFreeQueue<TResolveRequest*> Q_;
TSystemEvent E_;
typedef TAutoPtr<IThreadFactory::IThread> IThreadRef;
- TVector<IThreadRef> T_;
+ TVector<IThreadRef> T_;
};
}
namespace NDns {
- TNetworkAddressPtr ThreadedResolve(const TString& host, ui16 port) {
+ TNetworkAddressPtr ThreadedResolve(const TString& host, ui16 port) {
return TThreadedResolver::Instance()->Resolve(host, port);
}
}