diff options
Diffstat (limited to 'src/libutil/pool.hh')
-rw-r--r-- | src/libutil/pool.hh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libutil/pool.hh b/src/libutil/pool.hh index f291cd578388..20df21948849 100644 --- a/src/libutil/pool.hh +++ b/src/libutil/pool.hh @@ -137,15 +137,21 @@ public: } catch (...) { auto state_(state.lock()); state_->inUse--; + wakeup.notify_one(); throw; } } - unsigned int count() + size_t count() { auto state_(state.lock()); return state_->idle.size() + state_->inUse; } + + size_t capacity() + { + return state.lock()->max; + } }; } |