comparison Implab/Parallels/AsyncQueue.cs @ 128:6241bff0cd64 v2

Added Signal class a lightweight alternative to ManualResetEvent
author cin
date Thu, 29 Jan 2015 05:09:31 +0300
parents d86da8d2d4c3
children 471f596b2603
comparison
equal deleted inserted replaced
127:d86da8d2d4c3 128:6241bff0cd64
452 return ReadChunks(first, last); 452 return ReadChunks(first, last);
453 453
454 } while(true); 454 } while(true);
455 } 455 }
456 456
457 T[] ReadChunks(Chunk chunk, object last) { 457 static T[] ReadChunks(Chunk chunk, object last) {
458 var result = new List<T>(); 458 var result = new List<T>();
459 var buffer = new T[DEFAULT_CHUNK_SIZE]; 459 var buffer = new T[DEFAULT_CHUNK_SIZE];
460 int actual; 460 int actual;
461 bool recycle; 461 bool recycle;
462 while (chunk != null) { 462 while (chunk != null) {