From c29681a7777d85e715d0f7c28ce57256abee76e5 Mon Sep 17 00:00:00 2001 From: greg7mdp Date: Wed, 6 Aug 2025 10:07:58 -0400 Subject: [PATCH] Use `UniqueLock` in `extract()` instead of `SharedLock`. issue #280. --- parallel_hashmap/phmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parallel_hashmap/phmap.h b/parallel_hashmap/phmap.h index 39c55ac..48e53ab 100644 --- a/parallel_hashmap/phmap.h +++ b/parallel_hashmap/phmap.h @@ -3559,8 +3559,8 @@ public: class K = key_type, typename std::enable_if::value, int>::type = 0> node_type extract(const key_arg& key) { - SharedLock m; - auto it = this->template find(key, this->hash(key), m); + UniqueLock m; + auto it = this->template find(key, this->hash(key), m); return it == end() ? node_type() : extract(const_iterator{it}); }