comparison 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
comparison
equal deleted inserted replaced
129:471f596b2603 130:671f60cd0250
185 /// <param name="offset">The offset of the data in the buffer.</param> 185 /// <param name="offset">The offset of the data in the buffer.</param>
186 /// <param name="length">The size of the data to read from the buffer.</param> 186 /// <param name="length">The size of the data to read from the buffer.</param>
187 public void EnqueueRange(T[] data, int offset, int length) { 187 public void EnqueueRange(T[] data, int offset, int length) {
188 if (data == null) 188 if (data == null)
189 throw new ArgumentNullException("data"); 189 throw new ArgumentNullException("data");
190 if (length == 0)
191 return;
190 if (offset < 0) 192 if (offset < 0)
191 throw new ArgumentOutOfRangeException("offset"); 193 throw new ArgumentOutOfRangeException("offset");
192 if (length < 1 || offset + length > data.Length) 194 if (length < 1 || offset + length > data.Length)
193 throw new ArgumentOutOfRangeException("length"); 195 throw new ArgumentOutOfRangeException("length");
194 196