aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/module.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-02-17 16:02:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-02-17 16:02:25 +0200
commit68da2afcaa84479142e80e23712793f6ed3e2beb (patch)
treee30f39d361f73ef965a2cfa8c7c4e1e183fc9602 /libbuild2/module.cxx
parent25b6505d26f69715f84d773ae838d6ea19a22c19 (diff)
Add support for cheaply starting parallel scheduler pre-tuned to serial
Diffstat (limited to 'libbuild2/module.cxx')
-rw-r--r--libbuild2/module.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx
index 3f4f1d0..b7b9bbb 100644
--- a/libbuild2/module.cxx
+++ b/libbuild2/module.cxx
@@ -127,10 +127,11 @@ namespace build2
// Note that we can only do this if we are running serially because
// otherwise we cannot guarantee the scheduler is idle (we could have
// waiting threads from the outer context). This is fine for now since the
- // only two tuning level we use are serial and full concurrency (turns out
- // currently we don't really need this: we will always be called during
- // load or match phases and we always do parallel match; but let's keep it
- // in case things change).
+ // only two tuning level we use are serial and full concurrency. (Turns
+ // out currently we don't really need this: we will always be called
+ // during load or match phases and we always do parallel match; but let's
+ // keep it in case things change. Actually, we may need it, if the
+ // scheduler was started up in a tuned state, like in bpkg).
//
auto sched_tune (ctx.sched.serial ()
? scheduler::tune_guard (ctx.sched, 0)