private Object dequeue() {
        final Object[] items = this.items;
        final Object o = items[takeIndex];
        items[takeIndex] = null;
        if (++takeIndex == items.length) {
            takeIndex = 0;
        }
        count--;
        notFull.signal();
        return o;
    }
Extracts element at current take position, advances, and signals.
Call only when holding lock.
stroom-util/src/main/java/stroom/util/concurrent/CompletableQueue.java