aboutsummaryrefslogtreecommitdiff
path: root/src/strategies/low_latency2/queue_strategy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/strategies/low_latency2/queue_strategy.cc')
-rw-r--r--src/strategies/low_latency2/queue_strategy.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/strategies/low_latency2/queue_strategy.cc b/src/strategies/low_latency2/queue_strategy.cc
index a020c0d..e3ed808 100644
--- a/src/strategies/low_latency2/queue_strategy.cc
+++ b/src/strategies/low_latency2/queue_strategy.cc
@@ -29,15 +29,14 @@ static void notify_submit_impl(LowLatency2QueueStrategy& strategy,
const auto [iter, inserted] = strategy.frame_spans.try_emplace(present_id);
if (inserted) {
iter->second = std::make_unique<FrameSpan>(std::move(handle));
+ // Add our present_id to our ring tracking if it's non-zero.
+ if (present_id) {
+ strategy.stale_present_ids.push_back(present_id);
+ }
} else {
iter->second->update(std::move(handle));
}
- // Add our present_id to our ring tracking if it's non-zero.
- if (inserted && present_id) {
- strategy.stale_present_ids.push_back(present_id);
- }
-
// Remove stale present_id's if they weren't presented to.
if (std::size(strategy.stale_present_ids) >
LowLatency2QueueStrategy::MAX_TRACKED_PRESENTS) {