class BufferedEmittingPublisher implements Flow.Publisher<T> {

    public void complete() {
        if (state.compareAndSet(State.READY_TO_EMIT, State.COMPLETING)) {
            //drain buffer then complete
            State.READY_TO_EMIT.drain(this);
        }
    }

    protected  BufferedEmittingPublisher();

}