diff Implab/Parallels/BlockingQueue.cs @ 251:7c7e9ad6fe4a v3

Prerelease version of RunnableComponent Added draft messaging interfaces Added more more helpers to Xml/SerializationHelpers
author cin
date Sun, 11 Feb 2018 00:49:51 +0300
parents d6fe09f5592c
children
line wrap: on
line diff
--- a/Implab/Parallels/BlockingQueue.cs	Thu Feb 01 02:43:35 2018 +0300
+++ b/Implab/Parallels/BlockingQueue.cs	Sun Feb 11 00:49:51 2018 +0300
@@ -54,7 +54,7 @@
         }
 
         public T[] GetRange(int max, int timeout) {
-            Safe.ArgumentInRange(max, 1, Int32.MaxValue, "max");
+            Safe.ArgumentInRange(max > 0 , nameof(max));
 
             var buffer = new T[max];
             int actual;
@@ -83,7 +83,7 @@
         }
 
         public T[] GetRange(int max) {
-            Safe.ArgumentInRange(max, 1, Int32.MaxValue, "max");
+            Safe.ArgumentInRange(max > 0, nameof(max));
 
             var buffer = new T[max];
             int actual;