aboutsummaryrefslogtreecommitdiff
path: root/build2/variable
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-01-27 15:25:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-02-13 12:42:41 +0200
commitf93038fbee1631b95922b0742e0fd00fa8dae02e (patch)
tree6fe67cbde528ee8ded490085b9a8d5adc0ce5aca /build2/variable
parent267d34d2800d9cc3ed2865cbecf8d32f8f1ab6ec (diff)
Add notion of phase, enforce
Diffstat (limited to 'build2/variable')
-rw-r--r--build2/variable8
1 files changed, 7 insertions, 1 deletions
diff --git a/build2/variable b/build2/variable
index e296e37..d31d20f 100644
--- a/build2/variable
+++ b/build2/variable
@@ -781,7 +781,7 @@ namespace build2
// Variable pool.
//
- // Protected by the model mutex.
+ // The global version is protected by the model mutex.
//
class variable_pool
{
@@ -856,6 +856,8 @@ namespace build2
void
clear () {map_.clear ();}
+ variable_pool (): variable_pool (false) {}
+
// Proof of lock for RW access.
//
variable_pool&
@@ -902,6 +904,10 @@ namespace build2
return r;
}
+ explicit
+ variable_pool (bool global): global_ (global) {}
+
+ bool global_;
map map_;
};