Example #1
0
 public BlockingQueue(IEnumerable <T> collection)
 {
     _queue    = new Queue <T>(collection);
     _lock     = new ReentrantLock();
     _notEmpty = _lock.NewCondition();
 }
Example #2
0
 public BlockingQueue(int capacity)
 {
     _queue    = new Queue <T>(capacity);
     _lock     = new ReentrantLock();
     _notEmpty = _lock.NewCondition();
 }