コード例 #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);
 }