diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-28 13:44:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-28 13:45:46 +0200 |
commit | 24402ed431c1780914576f72350f8796308cb59b (patch) | |
tree | 53a064f0616b7b56feb23aefed401810b25e08c1 /build2/scheduler.hxx | |
parent | eace8edd98fe684e4631d9afb9be76ad3081f746 (diff) |
Tweak progress logic some more
Diffstat (limited to 'build2/scheduler.hxx')
-rw-r--r-- | build2/scheduler.hxx | 22 |
1 files changed, 11 insertions, 11 deletions
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_; }; |