aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/threading/future/core/future-inl.h
diff options
context:
space:
mode:
authorlexeyo <lexeyo@yandex-team.ru>2022-02-10 16:50:52 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:52 +0300
commit7bd28c29ae2a1fba7a03bcf4c658af66fe1373bf (patch)
tree125a82183c08c617e85c03a2036a11878fe21fce /library/cpp/threading/future/core/future-inl.h
parent00b32f5b0810b417c619169d137c29a64b54d464 (diff)
downloadydb-7bd28c29ae2a1fba7a03bcf4c658af66fe1373bf.tar.gz
Restoring authorship annotation for <lexeyo@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/threading/future/core/future-inl.h')
-rw-r--r--library/cpp/threading/future/core/future-inl.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/threading/future/core/future-inl.h b/library/cpp/threading/future/core/future-inl.h
index 5fd4296a93..128d6d967b 100644
--- a/library/cpp/threading/future/core/future-inl.h
+++ b/library/cpp/threading/future/core/future-inl.h
@@ -506,32 +506,32 @@ namespace NThreading {
////////////////////////////////////////////////////////////////////////////////
- class TFutureStateId {
- private:
- const void* Id;
-
- public:
- template <typename T>
- explicit TFutureStateId(const NImpl::TFutureState<T>& state)
- : Id(&state)
- {
- }
-
- const void* Value() const noexcept {
- return Id;
- }
- };
-
- inline bool operator==(const TFutureStateId& l, const TFutureStateId& r) {
- return l.Value() == r.Value();
- }
-
- inline bool operator!=(const TFutureStateId& l, const TFutureStateId& r) {
- return !(l == r);
- }
-
- ////////////////////////////////////////////////////////////////////////////////
-
+ class TFutureStateId {
+ private:
+ const void* Id;
+
+ public:
+ template <typename T>
+ explicit TFutureStateId(const NImpl::TFutureState<T>& state)
+ : Id(&state)
+ {
+ }
+
+ const void* Value() const noexcept {
+ return Id;
+ }
+ };
+
+ inline bool operator==(const TFutureStateId& l, const TFutureStateId& r) {
+ return l.Value() == r.Value();
+ }
+
+ inline bool operator!=(const TFutureStateId& l, const TFutureStateId& r) {
+ return !(l == r);
+ }
+
+ ////////////////////////////////////////////////////////////////////////////////
+
template <typename T>
inline TFuture<T>::TFuture(const TIntrusivePtr<TFutureState>& state) noexcept
: State(state)
@@ -642,11 +642,11 @@ namespace NThreading {
}
template <typename T>
- inline TMaybe<TFutureStateId> TFuture<T>::StateId() const noexcept {
- return State != nullptr ? MakeMaybe<TFutureStateId>(*State) : Nothing();
- }
-
- template <typename T>
+ inline TMaybe<TFutureStateId> TFuture<T>::StateId() const noexcept {
+ return State != nullptr ? MakeMaybe<TFutureStateId>(*State) : Nothing();
+ }
+
+ template <typename T>
inline void TFuture<T>::EnsureInitialized() const {
if (!State) {
ythrow TFutureException() << "state not initialized";
@@ -745,10 +745,10 @@ namespace NThreading {
return bool(State);
}
- inline TMaybe<TFutureStateId> TFuture<void>::StateId() const noexcept {
- return State != nullptr ? MakeMaybe<TFutureStateId>(*State) : Nothing();
- }
-
+ inline TMaybe<TFutureStateId> TFuture<void>::StateId() const noexcept {
+ return State != nullptr ? MakeMaybe<TFutureStateId>(*State) : Nothing();
+ }
+
inline void TFuture<void>::EnsureInitialized() const {
if (!State) {
ythrow TFutureException() << "state not initialized";