summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/util/cpu_usage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/vespalib/src/vespa/vespalib/util/cpu_usage.cpp b/vespalib/src/vespa/vespalib/util/cpu_usage.cpp
index 36e92b522b9..98ae95712a7 100644
--- a/vespalib/src/vespa/vespalib/util/cpu_usage.cpp
+++ b/vespalib/src/vespa/vespalib/util/cpu_usage.cpp
@@ -187,14 +187,14 @@ CpuUsage::remove_thread(ThreadTracker::SP tracker)
void
CpuUsage::handle_pending(const Guard &guard)
{
- for (auto &thread: _pending_remove) {
- do_remove_thread(guard, std::move(thread));
- }
- _pending_remove.clear();
for (auto &thread: _pending_add) {
do_add_thread(guard, std::move(thread));
}
_pending_add.clear();
+ for (auto &thread: _pending_remove) {
+ do_remove_thread(guard, std::move(thread));
+ }
+ _pending_remove.clear();
}
CpuUsage::TimedSample