@Override
    protected final long writeAcquire() {
        long producerIndex;
        long offset;

        do {
            producerIndex = lvProducerIndex(); // LoadLoad
            offset = offsetForIndex(producerIndex);

            // This is a bug! we need to replace with a solution a-la Vyukuv MPMC or similar slot 'phase' indicator
            if (!this.isReadReleased(offset)) {
                // It is possible that due to another producer passing us we are seeing that producer completed message,
                // if that is the case then we must retry.
                if (producerIndex != lvProducerIndex()) {
                    continue;// go around again
                }
                return EOF;
            }
        } while (!casProducerIndex(producerIndex, producerIndex + 1));
        // return offset for current producer index
        return offset;
    }
This is to be used for an IPC queue with the direct buffer used being a memory mapped file.

@param buff
@param capacity
jctools-channels/src/main/java/org/jctools/channels/mpsc/MpscOffHeapFixedSizeRingBuffer.java