aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-05-13 08:44:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-05-13 08:44:49 +0200
commita77a968800ba36cb04fb58c73e768f5ec137b45c (patch)
treede450815eb65ee631ab422cb61303a1af5b8cde2
parent330db1f15d95537e288b4c371a26e43b5a9b2196 (diff)
Don't both mark the scheduler queue and enter sub-phase
-rw-r--r--libbuild2/adhoc-rule-cxx.cxx10
-rw-r--r--libbuild2/module.cxx11
2 files changed, 2 insertions, 19 deletions
diff --git a/libbuild2/adhoc-rule-cxx.cxx b/libbuild2/adhoc-rule-cxx.cxx
index 1066f0a..ed87cbd 100644
--- a/libbuild2/adhoc-rule-cxx.cxx
+++ b/libbuild2/adhoc-rule-cxx.cxx
@@ -292,20 +292,12 @@ namespace build2
}
// Clear current project's environment and "switch" to the module
- // context.
+ // context, including entering a scheduler sub-phase.
//
auto_thread_env penv (nullptr);
context& ctx (*t.ctx.module_context);
-
- // Enter a scheduler sub-phase.
- //
scheduler::phase_guard pg (ctx.sched);
- // Mark the queue so that we don't work any tasks that may already be
- // there.
- //
- scheduler::queue_mark qm (ctx.sched);
-
const uint16_t verbosity (3); // Project creation command verbosity.
// Project and location signatures.
diff --git a/libbuild2/module.cxx b/libbuild2/module.cxx
index 2ee29d6..b31aa9c 100644
--- a/libbuild2/module.cxx
+++ b/libbuild2/module.cxx
@@ -413,21 +413,12 @@ namespace build2
ctx.module_context->modules_lock = ctx.modules_lock;
// Clear current project's environment and "switch" to the module
- // context.
+ // context, including entering a scheduler sub-phase.
//
auto_thread_env penv (nullptr);
context& ctx (*bs.ctx.module_context);
-
- // Enter a scheduler sub-phase.
- //
scheduler::phase_guard pg (ctx.sched);
- // Mark the queue so that we don't work any tasks that may already be
- // there (we could be called in strange ways, for example, as part of
- // match via dir_search()).
- //
- scheduler::queue_mark qm (ctx.sched);
-
// Load the imported project in the module context.
//
pair<names, const scope&> lr (