aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/future
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:13 +0300
commit736dcd8ca259457a136f2f9f9168c44643914323 (patch)
treeddd46a036d68bfa83aa11b892f31243ea6b068a1 /library/cpp/threading/future
parent9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff)
downloadydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/threading/future')
-rw-r--r--library/cpp/threading/future/async_ut.cpp2
-rw-r--r--library/cpp/threading/future/core/future-inl.h2
-rw-r--r--library/cpp/threading/future/core/future.h14
-rw-r--r--library/cpp/threading/future/future_ut.cpp72
-rw-r--r--library/cpp/threading/future/legacy_future_ut.cpp2
-rw-r--r--library/cpp/threading/future/perf/main.cpp4
-rw-r--r--library/cpp/threading/future/perf/ya.make2
-rw-r--r--library/cpp/threading/future/subscription/subscription_ut.cpp2
-rw-r--r--library/cpp/threading/future/subscription/wait_all_or_exception_ut.cpp2
-rw-r--r--library/cpp/threading/future/subscription/wait_all_ut.cpp2
-rw-r--r--library/cpp/threading/future/subscription/wait_any_ut.cpp2
-rw-r--r--library/cpp/threading/future/subscription/wait_ut_common.h2
-rw-r--r--library/cpp/threading/future/ut/ya.make2
13 files changed, 55 insertions, 55 deletions
diff --git a/library/cpp/threading/future/async_ut.cpp b/library/cpp/threading/future/async_ut.cpp
index a3699744e4..855fab8d0f 100644
--- a/library/cpp/threading/future/async_ut.cpp
+++ b/library/cpp/threading/future/async_ut.cpp
@@ -1,6 +1,6 @@
#include "async.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/ptr.h>
#include <util/generic/vector.h>
diff --git a/library/cpp/threading/future/core/future-inl.h b/library/cpp/threading/future/core/future-inl.h
index 5fd4296a93..6703645ca9 100644
--- a/library/cpp/threading/future/core/future-inl.h
+++ b/library/cpp/threading/future/core/future-inl.h
@@ -691,7 +691,7 @@ namespace NThreading {
EnsureInitialized();
return State->Wait();
}
-
+
inline bool TFuture<void>::Wait(TDuration timeout) const {
EnsureInitialized();
return State->Wait(timeout);
diff --git a/library/cpp/threading/future/core/future.h b/library/cpp/threading/future/core/future.h
index 2e82bb953e..18f55aba69 100644
--- a/library/cpp/threading/future/core/future.h
+++ b/library/cpp/threading/future/core/future.h
@@ -74,8 +74,8 @@ namespace NThreading {
TIntrusivePtr<TFutureState> State;
public:
- using value_type = T;
-
+ using value_type = T;
+
TFuture() noexcept = default;
TFuture(const TFuture<T>& other) noexcept = default;
TFuture(TFuture<T>&& other) noexcept = default;
@@ -131,8 +131,8 @@ namespace NThreading {
TIntrusivePtr<TFutureState> State = nullptr;
public:
- using value_type = void;
-
+ using value_type = void;
+
TFuture() noexcept = default;
TFuture(const TFuture<void>& other) noexcept = default;
TFuture(TFuture<void>&& other) noexcept = default;
@@ -169,9 +169,9 @@ namespace NThreading {
template <typename R>
TFuture<R> Return(const R& value) const;
- TFuture<void> IgnoreResult() const {
- return *this;
- }
+ TFuture<void> IgnoreResult() const {
+ return *this;
+ }
//! If the future is initialized returns the future state identifier. Otherwise returns an empty optional
/** The state identifier is guaranteed to be unique during the future state lifetime and could be reused after its death
diff --git a/library/cpp/threading/future/future_ut.cpp b/library/cpp/threading/future/future_ut.cpp
index 05950a568d..2068337f4e 100644
--- a/library/cpp/threading/future/future_ut.cpp
+++ b/library/cpp/threading/future/future_ut.cpp
@@ -1,6 +1,6 @@
#include "future.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <list>
#include <type_traits>
@@ -293,23 +293,23 @@ namespace {
}
Y_UNIT_TEST(ShouldWaitExceptionOrAllVectorWithValueType) {
- TPromise<int> promise1 = NewPromise<int>();
- TPromise<int> promise2 = NewPromise<int>();
-
- TVector<TFuture<int>> promises;
- promises.push_back(promise1);
- promises.push_back(promise2);
-
+ TPromise<int> promise1 = NewPromise<int>();
+ TPromise<int> promise2 = NewPromise<int>();
+
+ TVector<TFuture<int>> promises;
+ promises.push_back(promise1);
+ promises.push_back(promise2);
+
TFuture<void> future = WaitExceptionOrAll(promises);
- UNIT_ASSERT(!future.HasValue());
-
- promise1.SetValue(0);
- UNIT_ASSERT(!future.HasValue());
-
- promise2.SetValue(0);
- UNIT_ASSERT(future.HasValue());
- }
-
+ UNIT_ASSERT(!future.HasValue());
+
+ promise1.SetValue(0);
+ UNIT_ASSERT(!future.HasValue());
+
+ promise2.SetValue(0);
+ UNIT_ASSERT(future.HasValue());
+ }
+
Y_UNIT_TEST(ShouldWaitExceptionOrAllList) {
TPromise<void> promise1 = NewPromise();
TPromise<void> promise2 = NewPromise();
@@ -353,25 +353,25 @@ namespace {
UNIT_ASSERT(future.HasValue());
}
-
- Y_UNIT_TEST(ShouldWaitAnyVectorWithValueType) {
- TPromise<int> promise1 = NewPromise<int>();
- TPromise<int> promise2 = NewPromise<int>();
-
- TVector<TFuture<int>> promises;
- promises.push_back(promise1);
- promises.push_back(promise2);
-
- TFuture<void> future = WaitAny(promises);
- UNIT_ASSERT(!future.HasValue());
-
- promise1.SetValue(0);
- UNIT_ASSERT(future.HasValue());
-
- promise2.SetValue(0);
- UNIT_ASSERT(future.HasValue());
- }
-
+
+ Y_UNIT_TEST(ShouldWaitAnyVectorWithValueType) {
+ TPromise<int> promise1 = NewPromise<int>();
+ TPromise<int> promise2 = NewPromise<int>();
+
+ TVector<TFuture<int>> promises;
+ promises.push_back(promise1);
+ promises.push_back(promise2);
+
+ TFuture<void> future = WaitAny(promises);
+ UNIT_ASSERT(!future.HasValue());
+
+ promise1.SetValue(0);
+ UNIT_ASSERT(future.HasValue());
+
+ promise2.SetValue(0);
+ UNIT_ASSERT(future.HasValue());
+ }
+
Y_UNIT_TEST(ShouldWaitAnyList) {
TPromise<void> promise1 = NewPromise();
TPromise<void> promise2 = NewPromise();
diff --git a/library/cpp/threading/future/legacy_future_ut.cpp b/library/cpp/threading/future/legacy_future_ut.cpp
index ff63db1725..3bf8257387 100644
--- a/library/cpp/threading/future/legacy_future_ut.cpp
+++ b/library/cpp/threading/future/legacy_future_ut.cpp
@@ -1,6 +1,6 @@
#include "legacy_future.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
namespace NThreading {
Y_UNIT_TEST_SUITE(TLegacyFutureTest) {
diff --git a/library/cpp/threading/future/perf/main.cpp b/library/cpp/threading/future/perf/main.cpp
index 5a0690af47..3d362cd322 100644
--- a/library/cpp/threading/future/perf/main.cpp
+++ b/library/cpp/threading/future/perf/main.cpp
@@ -1,5 +1,5 @@
-#include <library/cpp/testing/benchmark/bench.h>
-#include <library/cpp/threading/future/future.h>
+#include <library/cpp/testing/benchmark/bench.h>
+#include <library/cpp/threading/future/future.h>
#include <util/generic/string.h>
#include <util/generic/xrange.h>
diff --git a/library/cpp/threading/future/perf/ya.make b/library/cpp/threading/future/perf/ya.make
index 943d585d4b..286a8a97bb 100644
--- a/library/cpp/threading/future/perf/ya.make
+++ b/library/cpp/threading/future/perf/ya.make
@@ -10,7 +10,7 @@ SRCS(
)
PEERDIR(
- library/cpp/threading/future
+ library/cpp/threading/future
)
END()
diff --git a/library/cpp/threading/future/subscription/subscription_ut.cpp b/library/cpp/threading/future/subscription/subscription_ut.cpp
index d018ea15cc..a33f54adf2 100644
--- a/library/cpp/threading/future/subscription/subscription_ut.cpp
+++ b/library/cpp/threading/future/subscription/subscription_ut.cpp
@@ -1,6 +1,6 @@
#include "subscription.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
using namespace NThreading;
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 34ae9edb4e..5d4794cd3c 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
@@ -1,7 +1,7 @@
#include "wait_all_or_exception.h"
#include "wait_ut_common.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/strbuf.h>
#include <atomic>
diff --git a/library/cpp/threading/future/subscription/wait_all_ut.cpp b/library/cpp/threading/future/subscription/wait_all_ut.cpp
index 3bc9762671..aee11c315e 100644
--- a/library/cpp/threading/future/subscription/wait_all_ut.cpp
+++ b/library/cpp/threading/future/subscription/wait_all_ut.cpp
@@ -1,7 +1,7 @@
#include "wait_all.h"
#include "wait_ut_common.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/strbuf.h>
#include <atomic>
diff --git a/library/cpp/threading/future/subscription/wait_any_ut.cpp b/library/cpp/threading/future/subscription/wait_any_ut.cpp
index 262080e8d1..42902832ed 100644
--- a/library/cpp/threading/future/subscription/wait_any_ut.cpp
+++ b/library/cpp/threading/future/subscription/wait_any_ut.cpp
@@ -1,7 +1,7 @@
#include "wait_any.h"
#include "wait_ut_common.h"
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/strbuf.h>
#include <exception>
diff --git a/library/cpp/threading/future/subscription/wait_ut_common.h b/library/cpp/threading/future/subscription/wait_ut_common.h
index 99530dd1f6..693a153924 100644
--- a/library/cpp/threading/future/subscription/wait_ut_common.h
+++ b/library/cpp/threading/future/subscription/wait_ut_common.h
@@ -1,7 +1,7 @@
#pragma once
#include <library/cpp/threading/future/future.h>
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <util/generic/vector.h>
diff --git a/library/cpp/threading/future/ut/ya.make b/library/cpp/threading/future/ut/ya.make
index 566b622370..704c0c5eb1 100644
--- a/library/cpp/threading/future/ut/ya.make
+++ b/library/cpp/threading/future/ut/ya.make
@@ -1,4 +1,4 @@
-UNITTEST_FOR(library/cpp/threading/future)
+UNITTEST_FOR(library/cpp/threading/future)
OWNER(
g:rtmr