summaryrefslogtreecommitdiffstats
path: root/util/thread
diff options
context:
space:
mode:
authortobo <[email protected]>2022-02-10 16:47:27 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:27 +0300
commit55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /util/thread
parent7fe839092527589b38f014d854c51565b3c1adfa (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/thread')
-rw-r--r--util/thread/factory.cpp2
-rw-r--r--util/thread/pool.cpp14
-rw-r--r--util/thread/pool.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/util/thread/factory.cpp b/util/thread/factory.cpp
index 150c4aa7830..48e898f32dc 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 e35fde4a1c5..05fad02e9b9 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 3f9c2bbe145..d1ea3a67cb6 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);