Skip to content

Commit c29681a

Browse files
committed
Use UniqueLock in extract() instead of SharedLock. issue #280.
1 parent b56fe78 commit c29681a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

parallel_hashmap/phmap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,8 +3559,8 @@ class parallel_hash_set
35593559
class K = key_type,
35603560
typename std::enable_if<!std::is_same<K, iterator>::value, int>::type = 0>
35613561
node_type extract(const key_arg<K>& key) {
3562-
SharedLock m;
3563-
auto it = this->template find<K, SharedLock>(key, this->hash(key), m);
3562+
UniqueLock m;
3563+
auto it = this->template find<K, UniqueLock>(key, this->hash(key), m);
35643564
return it == end() ? node_type() : extract(const_iterator{it});
35653565
}
35663566

0 commit comments

Comments
 (0)