diff options
author | Alexander Smirnov <alex@ydb.tech> | 2025-03-12 10:37:13 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2025-03-12 10:37:13 +0000 |
commit | b27c447af8bffc727382c0dc75272e261cbb4ac4 (patch) | |
tree | e0f6199fec84ae26bb5ea26566fa1daa12693e3b /library/cpp | |
parent | cb56e1cde2824ff3b64be1de4794bff3cab0db61 (diff) | |
parent | d06e9749bd6f0a561ee4fe296cdb3e03a24d1f82 (diff) | |
download | ydb-b27c447af8bffc727382c0dc75272e261cbb4ac4.tar.gz |
Merge pull request #15611 from ydb-platform/merge-libs-250312-0708
Diffstat (limited to 'library/cpp')
-rw-r--r-- | library/cpp/containers/concurrent_hash/concurrent_hash.h | 16 | ||||
-rw-r--r-- | library/cpp/tld/tlds-alpha-by-domain.txt | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/library/cpp/containers/concurrent_hash/concurrent_hash.h b/library/cpp/containers/concurrent_hash/concurrent_hash.h index 74573ecc09..6fed13ee8d 100644 --- a/library/cpp/containers/concurrent_hash/concurrent_hash.h +++ b/library/cpp/containers/concurrent_hash/concurrent_hash.h @@ -58,6 +58,16 @@ public: return r; } + bool TryRemoveUnsafe(const K& key, V& result) { + typename TActualMap::iterator it = Map.find(key); + if (it == Map.end()) { + return false; + } + result = std::move(it->second); + Map.erase(it); + return true; + } + bool HasUnsafe(const K& key) const { typename TActualMap::const_iterator it = Map.find(key); return (it != Map.end()); @@ -154,6 +164,12 @@ public: return bucket.RemoveUnsafe(key); } + bool TryRemove(const K& key, V& result) { + TBucket& bucket = GetBucketForKey(key); + TBucketGuard guard(bucket.Mutex); + return bucket.TryRemoveUnsafe(key, result); + } + bool Has(const K& key) const { const TBucket& bucket = GetBucketForKey(key); TBucketGuard guard(bucket.Mutex); diff --git a/library/cpp/tld/tlds-alpha-by-domain.txt b/library/cpp/tld/tlds-alpha-by-domain.txt index 2355ccc90c..12b3e4c9af 100644 --- a/library/cpp/tld/tlds-alpha-by-domain.txt +++ b/library/cpp/tld/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2025030700, Last Updated Fri Mar 7 07:07:01 2025 UTC +# Version 2025031000, Last Updated Mon Mar 10 07:07:01 2025 UTC AAA AARP ABB |