Browse Source

Restoring authorship annotation for <dronimal@yandex-team.ru>. Commit 2 of 2.

dronimal 3 years ago
parent
commit
f60febb7ea

+ 3 - 3
build/conf/license.conf

@@ -161,7 +161,7 @@ LICENSES_FORBIDDEN= \
 
 # Group for proprietary code licenses
 LICENSES_NDA= \
-    Intel-NDA \ 
+    Intel-NDA \
     mimepp \
     OracleOebs \
     Sophos-SDK \
@@ -220,7 +220,7 @@ LICENSES_PERMISSIVE= \
     BSD \
     BSD-1-Clause \
     BSD-2-Clause \
-    BSD-2-Clause-Patent \ 
+    BSD-2-Clause-Patent \
     BSD-2-Clause-Views \
     BSD-3-Clause \
     BSD-4-Clause \
@@ -247,7 +247,7 @@ LICENSES_PERMISSIVE= \
     ICU \
     Ietf \
     IJG \
-    Intel-Simplified \ 
+    Intel-Simplified \
     ISC \
     JSON \
     Khronos \

+ 3 - 3
build/rules/contrib_restricted.policy

@@ -3,9 +3,9 @@
 # NOTE: rules should be ordered from specific to generic (first matching rule is used)
 # See rule syntax docs: https://wiki.yandex-team.ru/devrules/overall/peerdirprohibition/
 
-# scale_ipp filter for ffmpeg use Intel IPP hence it is nonfree 
-ALLOW strm/cv/ffmpeg_adcv/toshik_filters -> contrib/restricted/ffmpeg-3-scale-ipp 
- 
+# scale_ipp filter for ffmpeg use Intel IPP hence it is nonfree
+ALLOW strm/cv/ffmpeg_adcv/toshik_filters -> contrib/restricted/ffmpeg-3-scale-ipp
+
 # CityHash-1.0.2 is a specific version hardwired into ClickHouse public interface
 ALLOW clickhouse -> contrib/restricted/cityhash-1.0.2
 ALLOW library/cpp/clickhouse -> contrib/restricted/cityhash-1.0.2

+ 2 - 2
contrib/libs/ya.make

@@ -318,8 +318,8 @@ RECURSE(
     subversion
     sundials
     svm
-    svt-hevc 
-    svt-vp9 
+    svt-hevc
+    svt-vp9
     szip
     t1ha
     taocrypt

+ 20 - 20
library/cpp/threading/future/core/future-inl.h

@@ -451,30 +451,30 @@ namespace NThreading {
         }
 
         template <typename T>
-        inline void SetValueImpl(TPromise<T>& promise, const TFuture<T>& future, 
-                                 std::enable_if_t<!std::is_void<T>::value, bool> = false) { 
+        inline void SetValueImpl(TPromise<T>& promise, const TFuture<T>& future,
+                                 std::enable_if_t<!std::is_void<T>::value, bool> = false) {
             future.Subscribe([=](const TFuture<T>& f) mutable {
-                T const* value; 
+                T const* value;
                 try {
-                    value = &f.GetValue(); 
+                    value = &f.GetValue();
                 } catch (...) {
                     promise.SetException(std::current_exception());
-                    return; 
+                    return;
                 }
-                promise.SetValue(*value); 
+                promise.SetValue(*value);
             });
         }
 
-        template <typename T> 
-        inline void SetValueImpl(TPromise<void>& promise, const TFuture<T>& future) { 
-            future.Subscribe([=](const TFuture<T>& f) mutable { 
+        template <typename T>
+        inline void SetValueImpl(TPromise<void>& promise, const TFuture<T>& future) {
+            future.Subscribe([=](const TFuture<T>& f) mutable {
                 try {
                     f.TryRethrow();
                 } catch (...) {
                     promise.SetException(std::current_exception());
-                    return; 
+                    return;
                 }
-                promise.SetValue(); 
+                promise.SetValue();
             });
         }
 
@@ -483,10 +483,10 @@ namespace NThreading {
             try {
                 SetValueImpl(promise, func());
             } catch (...) {
-                const bool success = promise.TrySetException(std::current_exception()); 
-                if (Y_UNLIKELY(!success)) { 
-                    throw; 
-                } 
+                const bool success = promise.TrySetException(std::current_exception());
+                if (Y_UNLIKELY(!success)) {
+                    throw;
+                }
             }
         }
 
@@ -497,9 +497,9 @@ namespace NThreading {
                 func();
             } catch (...) {
                 promise.SetException(std::current_exception());
-                return; 
+                return;
             }
-            promise.SetValue(); 
+            promise.SetValue();
         }
 
     }
@@ -631,7 +631,7 @@ namespace NThreading {
     inline TFuture<void> TFuture<T>::IgnoreResult() const {
         auto promise = NewPromise();
         Subscribe([=](const TFuture<T>& future) mutable {
-            NImpl::SetValueImpl(promise, future); 
+            NImpl::SetValueImpl(promise, future);
         });
         return promise;
     }
@@ -734,9 +734,9 @@ namespace NThreading {
                 future.TryRethrow();
             } catch (...) {
                 promise.SetException(std::current_exception());
-                return; 
+                return;
             }
-            promise.SetValue(value); 
+            promise.SetValue(value);
         });
         return promise;
     }

+ 21 - 21
library/cpp/threading/future/future_ut.cpp

@@ -239,27 +239,27 @@ namespace {
             UNIT_ASSERT_EXCEPTION(promise.TryRethrow(), TCustomException);
         }
 
-        Y_UNIT_TEST(ShouldRethrowCallbackException) { 
-            TPromise<int> promise = NewPromise<int>(); 
-            TFuture<int> future = promise.GetFuture(); 
-            future.Subscribe([](const TFuture<int>&) { 
-                throw TCustomException(); 
-            }); 
- 
-            UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException); 
-        } 
- 
-        Y_UNIT_TEST(ShouldRethrowCallbackExceptionIgnoreResult) { 
-            TPromise<int> promise = NewPromise<int>(); 
-            TFuture<void> future = promise.GetFuture().IgnoreResult(); 
-            future.Subscribe([](const TFuture<void>&) { 
-                throw TCustomException(); 
-            }); 
- 
-            UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException); 
-        } 
- 
- 
+        Y_UNIT_TEST(ShouldRethrowCallbackException) {
+            TPromise<int> promise = NewPromise<int>();
+            TFuture<int> future = promise.GetFuture();
+            future.Subscribe([](const TFuture<int>&) {
+                throw TCustomException();
+            });
+
+            UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException);
+        }
+
+        Y_UNIT_TEST(ShouldRethrowCallbackExceptionIgnoreResult) {
+            TPromise<int> promise = NewPromise<int>();
+            TFuture<void> future = promise.GetFuture().IgnoreResult();
+            future.Subscribe([](const TFuture<void>&) {
+                throw TCustomException();
+            });
+
+            UNIT_ASSERT_EXCEPTION(promise.SetValue(123), TCustomException);
+        }
+
+
         Y_UNIT_TEST(ShouldWaitExceptionOrAll) {
             TPromise<void> promise1 = NewPromise();
             TPromise<void> promise2 = NewPromise();