diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2017-04-26T18·28+0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26T18·28+0200 |
commit | 39b08f4c0c8851d96daa2b7d4e674b13c75afec7 (patch) | |
tree | 6285cec1e9e4541740e7bf78c2df9eb58d6b8f9c /src/libutil | |
parent | 45ce2c7413bf8c87aa7d5bc70a5a1c920c40a3b8 (diff) | |
parent | 4bc00760f9bc36d5b4e8bba7de9bd71a30d7f31a (diff) |
Merge pull request #1358 from shlevy/store-nesting
Add Store nesting to fix import-from-derivation within filterSource
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/pool.hh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libutil/pool.hh b/src/libutil/pool.hh index 20df21948849..7033090020ef 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()); |