public final void complete(O v){
  int state=this.state;
  for (; ; ) {
    if (state == FUSED_EMPTY) {
      setValue(v);
      STATE.lazySet(this,FUSED_READY);
      Subscriber<? super O> a=actual;
      a.onNext(v);
      if (this.state != CANCELLED) {
        a.onComplete();
      }
      return;
    }
    if ((state & ~HAS_REQUEST_NO_VALUE) != 0) {
      return;
    }
    if (state == HAS_REQUEST_NO_VALUE) {
      STATE.lazySet(this,HAS_REQUEST_HAS_VALUE);
      Subscriber<? super O> a=actual;
      a.onNext(v);
      if (this.state != CANCELLED) {
        a.onComplete();
      }
      return;
    }
    setValue(v);
    if (STATE.compareAndSet(this,NO_REQUEST_NO_VALUE,NO_REQUEST_HAS_VALUE)) {
      return;
    }
    state=this.state;
    if (state == CANCELLED) {
      value=null;
      return;
    }
  }
}

public final void complete ( O v ) { int state = this . state ; for ( ; ; ) { if ( state == FUSED_EMPTY ) { setValue ( v ) ; STATE . lazySet ( this , FUSED_READY ) ; Subscriber < ? super O > a = actual ; a . onNext ( v ) ; if ( this . state != CANCELLED ) { a . onComplete ( ) ; } return ; } if ( ( state & ~ HAS_REQUEST_NO_VALUE ) != 0 ) { return ; } if ( state == HAS_REQUEST_NO_VALUE ) { STATE . lazySet ( this , HAS_REQUEST_HAS_VALUE ) ; Subscriber < ? super O > a = actual ; a . onNext ( v ) ; if ( this . state != CANCELLED ) { a . onComplete ( ) ; } return ; } setValue ( v ) ; if ( STATE . compareAndSet ( this , NO_REQUEST_NO_VALUE , NO_REQUEST_HAS_VALUE ) ) { return ; } state = this . state ; if ( state == CANCELLED ) { value = null ; return ; } } }
tries to emit the value and complete the underlying subscriber or stores the value away until there is a request for it . < p > make sure this method is called at most once
