code: public T take() throws InterruptedException {
          lock.lock();
          try {
              while(count == 0)
                  not_empty.await();
              T el=buf[ri];
              buf[ri]=null;
              if(++ri == buf.length)
                  ri=0;
              count--;
              not_full.signal();
              return el;
          }
          finally {
              lock.unlock();
          }
      }
docs: Removes the next available element, blocking until one is available (if needed).
  @return The next available element