From 24402ed431c1780914576f72350f8796308cb59b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 28 Jul 2017 13:44:14 +0200 Subject: Tweak progress logic some more --- build2/scheduler.hxx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'build2/scheduler.hxx') diff --git a/build2/scheduler.hxx b/build2/scheduler.hxx index 33d0709..9e057b1 100644 --- a/build2/scheduler.hxx +++ b/build2/scheduler.hxx @@ -240,18 +240,7 @@ namespace build2 { explicit monitor_guard (scheduler* s = nullptr): s_ (s) {} - - ~monitor_guard () - { - if (s_ != nullptr) - { - s_->monitor_count_ = nullptr; - s_->monitor_func_ = nullptr; - } - } - monitor_guard (monitor_guard&& x): s_ (x.s_) {x.s_ = nullptr;} - monitor_guard& operator= (monitor_guard&& x) { if (&x != this) @@ -262,6 +251,17 @@ namespace build2 return *this; } + ~monitor_guard () + { + if (s_ != nullptr) + { + s_->monitor_count_ = nullptr; + s_->monitor_func_ = nullptr; + } + } + + explicit operator bool () const {return s_ != nullptr;} + private: scheduler* s_; }; -- cgit v1.1