diff options
author | seege <seege@yandex-team.ru> | 2022-02-10 16:52:02 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:52:02 +0300 |
commit | 091a65e2b3147ce957ba692cf07d3790405afe0f (patch) | |
tree | 15f7c2ea562ef90af9c1a569f333abde47757c86 | |
parent | 3c5791414a54ef78b12c0c57361aa20f58161f1d (diff) | |
download | ydb-091a65e2b3147ce957ba692cf07d3790405afe0f.tar.gz |
Restoring authorship annotation for <seege@yandex-team.ru>. Commit 1 of 2.
-rw-r--r-- | util/stream/file.cpp | 2 | ||||
-rw-r--r-- | util/thread/pool.cpp | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/util/stream/file.cpp b/util/stream/file.cpp index dc5d2f6311..c490e8986a 100644 --- a/util/stream/file.cpp +++ b/util/stream/file.cpp @@ -43,7 +43,7 @@ size_t TUnbufferedFileInput::DoSkip(size_t len) { } TUnbufferedFileOutput::TUnbufferedFileOutput(const TString& path) - : File_(path, CreateAlways | WrOnly | Seq) + : File_(path, CreateAlways | WrOnly | Seq) { if (!File_.IsOpen()) { ythrow TFileError() << "can not open " << path; diff --git a/util/thread/pool.cpp b/util/thread/pool.cpp index 05fad02e9b..3f31211d7f 100644 --- a/util/thread/pool.cpp +++ b/util/thread/pool.cpp @@ -131,18 +131,18 @@ public: inline size_t Size() const noexcept { auto guard = Guard(QueueMutex); - + return Queue.Size(); } - + inline size_t GetMaxQueueSize() const noexcept { return MaxQueueSize; } - + inline size_t GetThreadCountExpected() const noexcept { return ThreadCountExpected; } - + inline size_t GetThreadCountReal() const noexcept { return ThreadCountReal; } @@ -251,7 +251,7 @@ private: --ThreadCountReal; StopCond.Signal(); } - + private: TThreadPool* Parent_; const bool Blocking; @@ -269,7 +269,7 @@ private: size_t ThreadCountExpected; size_t ThreadCountReal; bool Forked; - + class TAtforkQueueRestarter { public: static TAtforkQueueRestarter& Get() { @@ -284,7 +284,7 @@ private: inline void UnregisterObject(TImpl* obj) { auto guard = Guard(ActionMutex); - + obj->Unlink(); } @@ -296,11 +296,11 @@ private: } } } - + static void ProcessChildAction() { Get().ChildAction(); } - + TIntrusiveList<TImpl> RegisteredObjects; TMutex ActionMutex; @@ -310,7 +310,7 @@ private: //no pthread_atfork on android libc #elif defined(_unix_) pthread_atfork(nullptr, nullptr, ProcessChildAction); -#endif +#endif } }; }; @@ -354,8 +354,8 @@ bool TThreadPool::Add(IObjectInQueue* obj) { if (Impl_->NeedRestart()) { Start(Impl_->GetThreadCountExpected(), Impl_->GetMaxQueueSize()); - } - + } + return Impl_->Add(obj); } |