Posted on: 12/8/2014 7:48:35 PM | Views : 470

Hi,
I've tried to work it out on my own, the subject seems to be beyond my knowledge and understanding , though. I need to implement the class as the one below as a generic static class
public class TakieQueue<T> { Queue<T> que = new Queue<T>(); Semaphore sem = new Semaphore(0, Int32.MaxValue); public void Enqueue(T item) { lock (que) { que.Enqueue(item); } sem.Release(); } public T Dequeue() { sem.WaitOne(); lock (que) { return que.Dequeue(); } } } Finally I need to get two queues. Now I define them in the following way:
TakieQueue<KeyValuePair<string, strin ...

Go to the complete details ...