Use UniqueLock in extract() instead of SharedLock. issue #280.

This commit is contained in:
greg7mdp
2025-08-06 10:07:58 -04:00
parent b56fe781f1
commit c29681a777
+2 -2
View File
@@ -3559,8 +3559,8 @@ public:
class K = key_type,
typename std::enable_if<!std::is_same<K, iterator>::value, int>::type = 0>
node_type extract(const key_arg<K>& key) {
SharedLock m;
auto it = this->template find<K, SharedLock>(key, this->hash(key), m);
UniqueLock m;
auto it = this->template find<K, UniqueLock>(key, this->hash(key), m);
return it == end() ? node_type() : extract(const_iterator{it});
}