diff options
| -rw-r--r-- | libadhocutil/resourcePool.h | 2 | ||||
| -rw-r--r-- | libadhocutil/resourcePool.impl.h | 8 | 
2 files changed, 10 insertions, 0 deletions
| diff --git a/libadhocutil/resourcePool.h b/libadhocutil/resourcePool.h index f77f2a5..9d8c625 100644 --- a/libadhocutil/resourcePool.h +++ b/libadhocutil/resourcePool.h @@ -75,6 +75,8 @@ namespace AdHoc {  			unsigned int inUseCount() const;  			/// Get number of available cached resources.  			unsigned int availableCount() const; +			/// Get number of free slots. +			unsigned int freeCount() const;  		protected:  			/// Create a new resource instance to add to the pool. diff --git a/libadhocutil/resourcePool.impl.h b/libadhocutil/resourcePool.impl.h index b421e62..b5d7e2f 100644 --- a/libadhocutil/resourcePool.impl.h +++ b/libadhocutil/resourcePool.impl.h @@ -162,6 +162,14 @@ namespace AdHoc {  	}  	template <typename R> +	unsigned int +	ResourcePool<R>::freeCount() const +	{ +		SharedLock(lock); +		return poolSize.freeCount(); +	} + +	template <typename R>  	ResourceHandle<R>  	ResourcePool<R>::getMine()  	{ | 
