public E remove(){ . . . E r = elements[head]; . . . spaceAvailableCondition.signalAll(); // Unblock waiting threads return r;}