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