From 4a2a3bd5033744c31377d31ca54be00622280a1b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 26 Feb 2024 09:14:37 +0200 Subject: Add ability to request serialization from scheduler In particular, this can be used to make sure no other recipe is being executed in parallel with the caller. --- libbuild2/context.ixx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbuild2/context.ixx') diff --git a/libbuild2/context.ixx b/libbuild2/context.ixx index 7b2a405..6c8c428 100644 --- a/libbuild2/context.ixx +++ b/libbuild2/context.ixx @@ -56,7 +56,7 @@ namespace build2 inline void wait_guard:: wait () { - phase_unlock u (*ctx, phase, true /* delay */); + phase_unlock u (phase ? ctx : nullptr, true /* delay */); ctx->sched->wait (start_count, *task_count, u); task_count = nullptr; } -- cgit v1.1