Пример #1
0
 /// <summary>
 /// Create a new user object for a SynchronizedQueue
 /// </summary>
 /// <param name="synchronizedQueue">The queue for which the user is created</param>
 public AbstractQueueProducer(SynchronizedQueue <T> synchronizedQueue)
 {
     sq = synchronizedQueue;
     t  = new Thread(threadMethod);
     t.Start();
     sq.AddWorker(t, QueueUserType.PRODUCER);
 }
Пример #2
0
 /// <summary>
 /// Create a new user object for a SynchronizedQueue
 /// </summary>
 /// <param name="synchronizedQueue">The queue for which the user is created</param>
 public AbstractQueueConsumer(SynchronizedQueue <T> synchronizedQueue)
 {
     sq = synchronizedQueue;
     t  = new Thread(threadMethod);
     t.Start();
     sq.AddWorker(t, QueueUserType.CONSUMER);
 }
Пример #3
0
 public DummyConsumer(SynchronizedQueue <string> queue) : base(queue)
 {
 }
Пример #4
0
 public DummyProducer(SynchronizedQueue <string> queue) : base(queue)
 {
 }