From 4bc00760f9bc36d5b4e8bba7de9bd71a30d7f31a Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 26 Apr 2017 12:38:16 -0400 Subject: Add Store nesting to fix import-from-derivation within filterSource --- src/libutil/pool.hh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/libutil') 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()); -- cgit v1.2.3