code: private boolean grow() {
          if (_growCapacity <= 0)
              return false;
  
          _tailLock.lock();
          try {
  
              _headLock.lock();
              try {
                  final int head = _indexes[HEAD_OFFSET];
                  final int tail = _indexes[TAIL_OFFSET];
                  final int newTail;
                  final int capacity = _elements.length;
  
                  Object[] elements = new Object[capacity + _growCapacity];
  
                  if (head < tail) {
                      newTail = tail - head;
                      System.arraycopy(_elements, head, elements, 0, newTail);
                  } else if (head > tail || _size.get() > 0) {
                      newTail = capacity + tail - head;
                      int cut = capacity - head;
                      System.arraycopy(_elements, head, elements, 0, cut);
                      System.arraycopy(_elements, 0, elements, cut, tail);
                  } else {
                      newTail = 0;
                  }
  
                  _elements = elements;
                  _indexes[HEAD_OFFSET] = 0;
                  _indexes[TAIL_OFFSET] = newTail;
                  return true;
              } finally {
                  _headLock.unlock();
              }
          } finally {
              _tailLock.unlock();
          }
      }
docs: /*----------------------------------------------------------------------------