diff options
author | grmammaev <grmammaev@yandex-team.ru> | 2022-02-10 16:50:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:15 +0300 |
commit | 3d636b3ac8d1e635bba5c5007da7a6d81f2c17f4 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library | |
parent | 648ad4dca7675cb9f970491c5df0e86aaefd5c3e (diff) | |
download | ydb-3d636b3ac8d1e635bba5c5007da7a6d81f2c17f4.tar.gz |
Restoring authorship annotation for <grmammaev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/cache/thread_safe_cache.h | 40 | ||||
-rw-r--r-- | library/python/ya.make | 2 |
2 files changed, 21 insertions, 21 deletions
diff --git a/library/cpp/cache/thread_safe_cache.h b/library/cpp/cache/thread_safe_cache.h index b7c71d8ff1..71e1442717 100644 --- a/library/cpp/cache/thread_safe_cache.h +++ b/library/cpp/cache/thread_safe_cache.h @@ -62,19 +62,19 @@ namespace NPrivate { Cache.Clear(); } - void Erase(TArgs... args) { - Key key = Callbacks.GetKey(args...); + void Erase(TArgs... args) { + Key key = Callbacks.GetKey(args...); if (!Contains(key)) { return; - } - TWriteGuard w(Mutex); - typename TInternalCache::TIterator i = Cache.Find(key); - if (i == Cache.End()) { - return; - } - Cache.Erase(i); - } - + } + TWriteGuard w(Mutex); + typename TInternalCache::TIterator i = Cache.Find(key); + if (i == Cache.End()) { + return; + } + Cache.Erase(i); + } + bool Contains(const Key& key) const { TReadGuard r(Mutex); auto iter = Cache.FindWithoutPromote(key); @@ -87,11 +87,11 @@ namespace NPrivate { } template <class TCallbacks> - static const TPtr Erase(TArgs... args) { - return TThreadSafeCacheSingleton<TCallbacks>::Erase(args...); - } - - template <class TCallbacks> + static const TPtr Erase(TArgs... args) { + return TThreadSafeCacheSingleton<TCallbacks>::Erase(args...); + } + + template <class TCallbacks> static void Clear() { return TThreadSafeCacheSingleton<TCallbacks>::Clear(); } @@ -144,10 +144,10 @@ namespace NPrivate { return Singleton<TThreadSafeCacheSingleton>()->Cache.Get(args...); } - static const TPtr Erase(TArgs... args) { - return Singleton<TThreadSafeCacheSingleton>()->Cache.Erase(args...); - } - + static const TPtr Erase(TArgs... args) { + return Singleton<TThreadSafeCacheSingleton>()->Cache.Erase(args...); + } + static void Clear() { return Singleton<TThreadSafeCacheSingleton>()->Cache.Clear(); } diff --git a/library/python/ya.make b/library/python/ya.make index 5e3ace8303..2e1eb6e0e1 100644 --- a/library/python/ya.make +++ b/library/python/ya.make @@ -170,7 +170,7 @@ RECURSE( sendmsg stubmaker solomon - spack + spack spyt ssh_client ssh_sign |