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 | 55a7f90e4cd31e9481cace8ee5dfd682c27e810e (patch) | |
tree | 9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/threading | |
parent | 7fe839092527589b38f014d854c51565b3c1adfa (diff) | |
download | ydb-55a7f90e4cd31e9481cace8ee5dfd682c27e810e.tar.gz |
Restoring authorship annotation for <tobo@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/threading')
8 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/threading/equeue/equeue.cpp b/library/cpp/threading/equeue/equeue.cpp index 9d3b2785db..54a848e912 100644 --- a/library/cpp/threading/equeue/equeue.cpp +++ b/library/cpp/threading/equeue/equeue.cpp @@ -29,7 +29,7 @@ public: AtomicIncrement(Queue_->ObjectCount_); } - ~TDecrementingWrapper() override { + ~TDecrementingWrapper() override { AtomicDecrement(Queue_->ObjectCount_); AtomicDecrement(Queue_->GuardCount_); } diff --git a/library/cpp/threading/equeue/equeue_ut.cpp b/library/cpp/threading/equeue/equeue_ut.cpp index 5ff4c69347..9cf2aced44 100644 --- a/library/cpp/threading/equeue/equeue_ut.cpp +++ b/library/cpp/threading/equeue/equeue_ut.cpp @@ -41,7 +41,7 @@ Y_UNIT_TEST_SUITE(TElasticQueueTest) { Counters.Reset(); struct TWaitJob: public IObjectInQueue { - void Process(void*) override { + void Process(void*) override { WaitEvent.Wait(); AtomicIncrement(Counters.Processed); } @@ -72,7 +72,7 @@ Y_UNIT_TEST_SUITE(TElasticQueueTest) { //concurrent test -- send many jobs from different threads struct TJob: public IObjectInQueue { - void Process(void*) override { + void Process(void*) override { AtomicIncrement(Counters.Processed); }; }; @@ -96,7 +96,7 @@ Y_UNIT_TEST_SUITE(TElasticQueueTest) { TryCounter = 0; struct TSender: public IThreadFactory::IThreadAble { - void DoExecute() override { + void DoExecute() override { while ((size_t)AtomicIncrement(TryCounter) <= N) { if (!TryAdd()) { Sleep(TDuration::MicroSeconds(50)); diff --git a/library/cpp/threading/future/subscription/wait_all_or_exception_ut.cpp b/library/cpp/threading/future/subscription/wait_all_or_exception_ut.cpp index 0a9f84ab69..34ae9edb4e 100644 --- a/library/cpp/threading/future/subscription/wait_all_or_exception_ut.cpp +++ b/library/cpp/threading/future/subscription/wait_all_or_exception_ut.cpp @@ -29,7 +29,7 @@ Y_UNIT_TEST_SUITE(TWaitAllOrExceptionTest) { auto w = NWait::WaitAllOrException(p1.GetFuture(), p2.GetFuture()); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception"; + constexpr TStringBuf message = "Test exception"; p1.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -54,7 +54,7 @@ Y_UNIT_TEST_SUITE(TWaitAllOrExceptionTest) { auto w = NWait::WaitAllOrException(f, p.GetFuture()); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 2"; + constexpr TStringBuf message = "Test exception 2"; p.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -85,7 +85,7 @@ Y_UNIT_TEST_SUITE(TWaitAllOrExceptionTest) { auto w = NWait::WaitAllOrException(TVector<TFuture<void>>{ p.GetFuture() }); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 3"; + constexpr TStringBuf message = "Test exception 3"; p.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -112,7 +112,7 @@ Y_UNIT_TEST_SUITE(TWaitAllOrExceptionTest) { auto w = NWait::WaitAllOrException(TVector<TFuture<int>>{ p1.GetFuture(), f, p2.GetFuture() }); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 4"; + constexpr TStringBuf message = "Test exception 4"; p1.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -124,7 +124,7 @@ Y_UNIT_TEST_SUITE(TWaitAllOrExceptionTest) { Y_UNIT_TEST(TestManyWithVectorAndIntialError) { auto p1 = NewPromise(); auto p2 = NewPromise(); - constexpr TStringBuf message = "Test exception 5"; + constexpr TStringBuf message = "Test exception 5"; auto f = MakeErrorFuture<void>(std::make_exception_ptr(yexception() << message)); auto w = NWait::WaitAllOrException(TVector<TFuture<void>>{ p1.GetFuture(), p2.GetFuture(), f }); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { diff --git a/library/cpp/threading/future/subscription/wait_all_ut.cpp b/library/cpp/threading/future/subscription/wait_all_ut.cpp index 73e2d4d6e4..3bc9762671 100644 --- a/library/cpp/threading/future/subscription/wait_all_ut.cpp +++ b/library/cpp/threading/future/subscription/wait_all_ut.cpp @@ -29,7 +29,7 @@ Y_UNIT_TEST_SUITE(TWaitAllTest) { auto w = NWait::WaitAll(p1.GetFuture(), p2.GetFuture()); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception"; + constexpr TStringBuf message = "Test exception"; p1.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT(!w.HasValue() && !w.HasException()); @@ -55,7 +55,7 @@ Y_UNIT_TEST_SUITE(TWaitAllTest) { auto w = NWait::WaitAll(f, p.GetFuture()); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 2"; + constexpr TStringBuf message = "Test exception 2"; p.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -86,7 +86,7 @@ Y_UNIT_TEST_SUITE(TWaitAllTest) { auto w = NWait::WaitAll(TVector<TFuture<void>>{ p.GetFuture() }); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 3"; + constexpr TStringBuf message = "Test exception 3"; p.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -113,7 +113,7 @@ Y_UNIT_TEST_SUITE(TWaitAllTest) { auto w = NWait::WaitAll(TVector<TFuture<int>>{ p1.GetFuture(), f, p2.GetFuture() }); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 4"; + constexpr TStringBuf message = "Test exception 4"; p1.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT(!w.HasValue() && !w.HasException()); diff --git a/library/cpp/threading/future/subscription/wait_any_ut.cpp b/library/cpp/threading/future/subscription/wait_any_ut.cpp index 745072b892..262080e8d1 100644 --- a/library/cpp/threading/future/subscription/wait_any_ut.cpp +++ b/library/cpp/threading/future/subscription/wait_any_ut.cpp @@ -27,7 +27,7 @@ Y_UNIT_TEST_SUITE(TWaitAnyTest) { auto w = NWait::WaitAny(p1.GetFuture(), p2.GetFuture()); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception"; + constexpr TStringBuf message = "Test exception"; p2.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -47,7 +47,7 @@ Y_UNIT_TEST_SUITE(TWaitAnyTest) { Y_UNIT_TEST(TestOneUnsignaledOneSignaledWithException) { auto p = NewPromise(); - constexpr TStringBuf message = "Test exception 2"; + constexpr TStringBuf message = "Test exception 2"; auto f = MakeErrorFuture<void>(std::make_exception_ptr(yexception() << message)); auto w = NWait::WaitAny(f, p.GetFuture()); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { @@ -81,7 +81,7 @@ Y_UNIT_TEST_SUITE(TWaitAnyTest) { auto w = NWait::WaitAny(TVector<TFuture<void>>{ p.GetFuture() }); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 3"; + constexpr TStringBuf message = "Test exception 3"; p.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); @@ -121,7 +121,7 @@ Y_UNIT_TEST_SUITE(TWaitAnyTest) { auto w = NWait::WaitAny(TVector<TFuture<void>>{ p1.GetFuture(), p2.GetFuture(), p3.GetFuture() }); UNIT_ASSERT(!w.HasValue() && !w.HasException()); - constexpr TStringBuf message = "Test exception 4"; + constexpr TStringBuf message = "Test exception 4"; p2.SetException(std::make_exception_ptr(yexception() << message)); UNIT_ASSERT_EXCEPTION_SATISFIES(w.TryRethrow(), yexception, [message](auto const& e) { return message == e.what(); diff --git a/library/cpp/threading/skip_list/perf/main.cpp b/library/cpp/threading/skip_list/perf/main.cpp index 8b6365d233..4ad52049e7 100644 --- a/library/cpp/threading/skip_list/perf/main.cpp +++ b/library/cpp/threading/skip_list/perf/main.cpp @@ -18,11 +18,11 @@ namespace { //////////////////////////////////////////////////////////////////////////////// - IOutputStream& LogInfo() { + IOutputStream& LogInfo() { return Cerr << TInstant::Now() << " INFO: "; } - IOutputStream& LogError() { + IOutputStream& LogError() { return Cerr << TInstant::Now() << " ERROR: "; } diff --git a/library/cpp/threading/task_scheduler/task_scheduler.cpp b/library/cpp/threading/task_scheduler/task_scheduler.cpp index e3a847b234..174dde4bf7 100644 --- a/library/cpp/threading/task_scheduler/task_scheduler.cpp +++ b/library/cpp/threading/task_scheduler/task_scheduler.cpp @@ -85,7 +85,7 @@ namespace { AtomicIncrement(Counter_); } - ~TTaskWrapper() override { + ~TTaskWrapper() override { AtomicDecrement(Counter_); } private: diff --git a/library/cpp/threading/task_scheduler/task_scheduler_ut.cpp b/library/cpp/threading/task_scheduler/task_scheduler_ut.cpp index 50e40316d0..3b5203194a 100644 --- a/library/cpp/threading/task_scheduler/task_scheduler_ut.cpp +++ b/library/cpp/threading/task_scheduler/task_scheduler_ut.cpp @@ -21,10 +21,10 @@ class TTaskSchedulerTest: public TTestBase { AtomicIncrement(ScheduledTaskCounter_); } - ~TCheckTask() override { + ~TCheckTask() override { } - bool Process() override { + bool Process() override { const TDuration delay = Now() - Start_; if (delay < Delay_) { |