public synchronized T take() {
		
		while (elements.isEmpty()) {
			try {
				wait();
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		T el = elements.removeFirst();
		notify();
		return el;
	}