diff --git a/ManagedPool/Pool_T_.cs b/ManagedPool/Pool_T_.cs index fb4e65d..d26e248 100644 --- a/ManagedPool/Pool_T_.cs +++ b/ManagedPool/Pool_T_.cs @@ -87,6 +87,7 @@ namespace eu.railduction.netcore.dll.ManagedPool if (batch <= 0) throw new InvalidOperationException($"Invalid parameter batch='{batch}'. Must be at least '1'!"); if (increaseBuffer <= 0) throw new InvalidOperationException($"Invalid parameter increaseBuffer='{increaseBuffer}'. Must be at least '1'!"); if (decreaseBuffer <= 0) throw new InvalidOperationException($"Invalid parameter decreaseBuffer='{decreaseBuffer}'. Must be at least '1'!"); + if (batch < decreaseBuffer) throw new InvalidOperationException($"Invalid parameter decreaseBuffer='{decreaseBuffer}'. Must be at least batch='{batch}'!"); } private T getItem()