We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 573ab84 commit 5aba40dCopy full SHA for 5aba40d
hnswlib/hnswalg.h
@@ -1099,14 +1099,15 @@ class HierarchicalNSW : public AlgorithmInterface<dist_t> {
1099
label_lookup_[label] = cur_c;
1100
}
1101
1102
+ std::unique_lock <std::mutex> templock(global);
1103
+
1104
std::unique_lock <std::mutex> lock_el(link_list_locks_[cur_c]);
1105
int curlevel = getRandomLevel(mult_);
1106
if (level > 0)
1107
curlevel = level;
1108
1109
element_levels_[cur_c] = curlevel;
1110
- std::unique_lock <std::mutex> templock(global);
1111
int maxlevelcopy = maxlevel_;
1112
if (curlevel <= maxlevelcopy)
1113
templock.unlock();
0 commit comments