about summary refs log tree commit diff
path: root/src/libutil/pool.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/pool.hh')
-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 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());