Mercurial > pub > ImplabNet
diff Implab/Parallels/AsyncQueue.cs @ 137:238e15580926 v2
added the blocking queue
author | cin |
---|---|
date | Mon, 16 Feb 2015 17:48:39 +0300 |
parents | 671f60cd0250 |
children | 8d5de4eb9c2c |
line wrap: on
line diff
--- a/Implab/Parallels/AsyncQueue.cs Mon Feb 16 01:14:09 2015 +0300 +++ b/Implab/Parallels/AsyncQueue.cs Mon Feb 16 17:48:39 2015 +0300 @@ -158,7 +158,7 @@ /// Adds the specified value to the queue. /// </summary> /// <param name="value">Tha value which will be added to the queue.</param> - public void Enqueue(T value) { + public virtual void Enqueue(T value) { var last = m_last; // spin wait to the new chunk bool extend = true; @@ -184,7 +184,7 @@ /// <param name="data">The buffer which contains the data to be enqueued.</param> /// <param name="offset">The offset of the data in the buffer.</param> /// <param name="length">The size of the data to read from the buffer.</param> - public void EnqueueRange(T[] data, int offset, int length) { + public virtual void EnqueueRange(T[] data, int offset, int length) { if (data == null) throw new ArgumentNullException("data"); if (length == 0)