diff options
Diffstat (limited to 'libbuild2/context.cxx')
-rw-r--r-- | libbuild2/context.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libbuild2/context.cxx b/libbuild2/context.cxx index fe046ae..a3455ea 100644 --- a/libbuild2/context.cxx +++ b/libbuild2/context.cxx @@ -894,6 +894,14 @@ namespace build2 } phase_switch:: + phase_switch (phase_unlock&& u, phase_lock&& l) + : old_phase (u.l->phase), new_phase (l.phase) + { + phase_lock_instance = u.l; // Disarms phase_lock + u.l = nullptr; // Disarms phase_unlock + } + + phase_switch:: ~phase_switch () noexcept (false) { phase_lock* pl (phase_lock_instance); |