From 29e92840c5eb6e56e047d1b0d2b80db66e9eaae5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Feb 2017 15:27:06 +0200 Subject: Make scheduler::async() indicate whether the task executed synchronously --- build2/scheduler.txx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'build2/scheduler.txx') diff --git a/build2/scheduler.txx b/build2/scheduler.txx index 01408ca..d5e9afa 100644 --- a/build2/scheduler.txx +++ b/build2/scheduler.txx @@ -7,7 +7,7 @@ namespace build2 { template - void scheduler:: + bool scheduler:: async (size_t start_count, atomic_count& task_count, F&& f, A&&... a) { using task = task_type; @@ -56,7 +56,7 @@ namespace build2 if (td == nullptr) { forward (f) (forward (a)...); - return; + return false; } // Increment the task count. @@ -70,6 +70,8 @@ namespace build2 // if (active_ < max_active_) activate_helper (l); + + return true; } template -- cgit v1.1