aboutsummaryrefslogtreecommitdiff
path: root/src/libutil
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2017-04-26 12:38:16 -0400
committerShea Levy <shea@shealevy.com>2017-04-26 14:15:47 -0400
commit4bc00760f9bc36d5b4e8bba7de9bd71a30d7f31a (patch)
treec3b20ad676ed2a3e6f8cdfe4a2e4f04aad111a2b /src/libutil
parent98a2adb1359ec35ac8da7a52754d2290531f8cef (diff)
Add Store nesting to fix import-from-derivation within filterSource
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/pool.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libutil/pool.hh b/src/libutil/pool.hh
index 20df21948..703309002 100644
--- a/src/libutil/pool.hh
+++ b/src/libutil/pool.hh
@@ -68,6 +68,22 @@ public:
state_->max = max;
}
+ void incCapacity()
+ {
+ auto state_(state.lock());
+ state_->max++;
+ /* we could wakeup here, but this is only used when we're
+ * about to nest Pool usages, and we want to save the slot for
+ * the nested use if we can
+ */
+ }
+
+ void decCapacity()
+ {
+ auto state_(state.lock());
+ state_->max--;
+ }
+
~Pool()
{
auto state_(state.lock());