Mercurial > pub > ImplabNet
diff Implab/Parallels/AsyncQueue.cs @ 130:671f60cd0250 v2
fixed Resove method bug when calling it on already cancelled promise
author | cin |
---|---|
date | Fri, 30 Jan 2015 17:07:17 +0300 |
parents | 471f596b2603 |
children | 238e15580926 |
line wrap: on
line diff
--- a/Implab/Parallels/AsyncQueue.cs Thu Jan 29 18:31:06 2015 +0300 +++ b/Implab/Parallels/AsyncQueue.cs Fri Jan 30 17:07:17 2015 +0300 @@ -187,6 +187,8 @@ public void EnqueueRange(T[] data, int offset, int length) { if (data == null) throw new ArgumentNullException("data"); + if (length == 0) + return; if (offset < 0) throw new ArgumentOutOfRangeException("offset"); if (length < 1 || offset + length > data.Length)