aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/context.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/build2/context.cxx b/build2/context.cxx
index 3d2a242..c704cd2 100644
--- a/build2/context.cxx
+++ b/build2/context.cxx
@@ -309,7 +309,10 @@ namespace build2
// longer be valid.
//
if (n == run_phase::load && uncaught_exception ())
+ {
+ mlock l (phase_mutex::instance.m_);
phase_mutex::instance.fail_ = true;
+ }
bool r (phase_mutex::instance.relock (n, o));
phase_lock::instance->p = o;