@Override
    public int fill(Supplier<E> s)
    {
        long result = 0;// result is a long because we want to have a safepoint check at regular intervals
        final int capacity = capacity();
        do
        {
            final int filled = fill(s, PortableJvmInfo.RECOMENDED_OFFER_BATCH);
            if (filled == 0)
            {
                return (int) result;
            }
            result += filled;
        }
        while (result <= capacity);
        return (int) result;
    }
Validates a slow producer over-claim throwing {@link IllegalStateException} if the offer on it can't continue.
jctools-experimental/src/main/java/org/jctools/queues/MpscRelaxedArrayQueue.java