Skip to content

Commit 971cebe

Browse files
committed
Don't release the lock in extract.
1 parent 5ecd21b commit 971cebe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/gtl/phmap.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4121,7 +4121,8 @@ class parallel_hash_set {
41214121

41224122
template<class K = key_type, typename std::enable_if_t<!std::is_same_v<K, iterator>, int> = 0>
41234123
node_type extract(const key_arg<K>& key) {
4124-
auto it = find(key);
4124+
UniqueLock m;
4125+
auto it = this->template find<K, UniqueLock>(key, this->hash(key), m);
41254126
return it == end() ? node_type() : extract(const_iterator{ it });
41264127
}
41274128

0 commit comments

Comments
 (0)