diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-03 07:42:02 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2024-10-03 07:42:02 +0200 |
commit | b9b3b7312a377eefa241b5a2d9c6c39f715b26da (patch) | |
tree | b48dab56adc6310e0a30bad6a743d5169dda5589 /libbuild2/scheduler.txx | |
parent | 1fbeda93459ca4f8e326f4c3723a1ecb94c3f45f (diff) |
Show executed during match target count in match progress
Diffstat (limited to 'libbuild2/scheduler.txx')
-rw-r--r-- | libbuild2/scheduler.txx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libbuild2/scheduler.txx b/libbuild2/scheduler.txx index 87c9384..15fefcc 100644 --- a/libbuild2/scheduler.txx +++ b/libbuild2/scheduler.txx @@ -29,12 +29,13 @@ namespace build2 // if (monitor_count_ != nullptr) { + size_t t (monitor_tshold_.load (memory_order_relaxed)); + size_t p (monitor_prev_); size_t v (monitor_count_->load (memory_order_relaxed)); - if (v != monitor_init_) + if ((p > v ? p - v : p < v ? v - p : 0) >= t) { - size_t t (monitor_tshold_.load (memory_order_relaxed)); - if (v > monitor_init_ ? (v >= t) : (v <= t)) - monitor_tshold_.store (monitor_func_ (v), memory_order_relaxed); + monitor_tshold_.store (monitor_func_ (p, v), memory_order_relaxed); + monitor_prev_ = v; } } |