aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/context.ixx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/context.ixx')
-rw-r--r--libbuild2/context.ixx8
1 files changed, 2 insertions, 6 deletions
diff --git a/libbuild2/context.ixx b/libbuild2/context.ixx
index 73601d4..4f86c28 100644
--- a/libbuild2/context.ixx
+++ b/libbuild2/context.ixx
@@ -56,12 +56,8 @@ namespace build2
inline void wait_guard::
wait ()
{
- if (task_count->load (memory_order_acquire) > start_count)
- {
- phase_unlock u (*ctx, phase);
- ctx->sched.wait (start_count, *task_count);
- }
-
+ phase_unlock u (*ctx, phase, true /* delay */);
+ ctx->sched.wait (start_count, *task_count, u);
task_count = nullptr;
}
}