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 | e7d460ea3389cb4f573ef5fb09f7072549a17765 (patch) | |
tree | ab7fbbf3253d4c0e2793218f09378908beb025fb | |
parent | 091a65e2b3147ce957ba692cf07d3790405afe0f (diff) | |
download | ydb-e7d460ea3389cb4f573ef5fb09f7072549a17765.tar.gz |
Restoring authorship annotation for <seege@yandex-team.ru>. Commit 2 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 c490e8986a..dc5d2f6311 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 3f31211d7f..05fad02e9b 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); } |