Handle when priorityQ goes from not full to full.
@@ -38,9 +38,13 @@ public:
} else if (distance < _priQ.front()) {
_priQ.front() = distance;
_priQ.adjust();
+ }
+ if (_priQ.size() >= _size) {
+ if (_distance_threshold.load(std::memory_order_relaxed) > _priQ.front()) {
_distance_threshold.store(_priQ.front(), std::memory_order_relaxed);
}
}
+ }
};
}
