diff options
author | tobo <tobo@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:27 +0300 |
commit | 7fe839092527589b38f014d854c51565b3c1adfa (patch) | |
tree | 309e97022d3530044b712b8f71318c78faf7856e /util/thread | |
parent | d0d68c395c10da4cb56a1c845504570a04d7893e (diff) | |
download | ydb-7fe839092527589b38f014d854c51565b3c1adfa.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/thread')
-rw-r--r-- | util/thread/factory.cpp | 2 | ||||
-rw-r--r-- | util/thread/pool.cpp | 14 | ||||
-rw-r--r-- | util/thread/pool.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/util/thread/factory.cpp b/util/thread/factory.cpp index 48e898f32d..150c4aa783 100644 --- a/util/thread/factory.cpp +++ b/util/thread/factory.cpp @@ -56,7 +56,7 @@ namespace { : Func(func) { } - void DoExecute() override { + void DoExecute() override { THolder<TThreadFactoryFuncObj> self(this); Func(); } diff --git a/util/thread/pool.cpp b/util/thread/pool.cpp index 05fad02e9b..e35fde4a1c 100644 --- a/util/thread/pool.cpp +++ b/util/thread/pool.cpp @@ -350,7 +350,7 @@ size_t TThreadPool::GetMaxQueueSize() const noexcept { } bool TThreadPool::Add(IObjectInQueue* obj) { - Y_ENSURE_EX(Impl_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); + Y_ENSURE_EX(Impl_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); if (Impl_->NeedRestart()) { Start(Impl_->GetThreadCountExpected(), Impl_->GetMaxQueueSize()); @@ -455,7 +455,7 @@ public: Obj_ = obj; - Y_ENSURE_EX(!AllDone_, TThreadPoolException() << TStringBuf("adding to a stopped queue")); + Y_ENSURE_EX(!AllDone_, TThreadPoolException() << TStringBuf("adding to a stopped queue")); } CondReady_.Signal(); @@ -566,7 +566,7 @@ DEFINE_THREAD_POOL_CTORS(TSimpleThreadPool) TAdaptiveThreadPool::~TAdaptiveThreadPool() = default; bool TAdaptiveThreadPool::Add(IObjectInQueue* obj) { - Y_ENSURE_EX(Impl_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); + Y_ENSURE_EX(Impl_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); Impl_->Add(obj); @@ -590,7 +590,7 @@ size_t TAdaptiveThreadPool::Size() const noexcept { } void TAdaptiveThreadPool::SetMaxIdleTime(TDuration interval) { - Y_ENSURE_EX(Impl_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); + Y_ENSURE_EX(Impl_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); Impl_->SetMaxIdleTime(interval); } @@ -604,7 +604,7 @@ TSimpleThreadPool::~TSimpleThreadPool() { } bool TSimpleThreadPool::Add(IObjectInQueue* obj) { - Y_ENSURE_EX(Slave_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); + Y_ENSURE_EX(Slave_.Get(), TThreadPoolException() << TStringBuf("mtp queue not started")); return Slave_->Add(obj); } @@ -660,11 +660,11 @@ namespace { } void IThreadPool::SafeAdd(IObjectInQueue* obj) { - Y_ENSURE_EX(Add(obj), TThreadPoolException() << TStringBuf("can not add object to queue")); + Y_ENSURE_EX(Add(obj), TThreadPoolException() << TStringBuf("can not add object to queue")); } void IThreadPool::SafeAddAndOwn(THolder<IObjectInQueue> obj) { - Y_ENSURE_EX(AddAndOwn(std::move(obj)), TThreadPoolException() << TStringBuf("can not add to queue and own")); + Y_ENSURE_EX(AddAndOwn(std::move(obj)), TThreadPoolException() << TStringBuf("can not add to queue and own")); } bool IThreadPool::AddAndOwn(THolder<IObjectInQueue> obj) { diff --git a/util/thread/pool.h b/util/thread/pool.h index d1ea3a67cb..3f9c2bbe14 100644 --- a/util/thread/pool.h +++ b/util/thread/pool.h @@ -150,7 +150,7 @@ public: template <class T> void SafeAddFunc(T&& func) { - Y_ENSURE_EX(AddFunc(std::forward<T>(func)), TThreadPoolException() << TStringBuf("can not add function to queue")); + Y_ENSURE_EX(AddFunc(std::forward<T>(func)), TThreadPoolException() << TStringBuf("can not add function to queue")); } void SafeAddAndOwn(THolder<IObjectInQueue> obj); |