private void wakeIn(){
  StateInPipe stateOld;
  StateInPipe stateNew;
  do {
    stateOld=_stateInRef.get();
    if (stateOld.isActive()) {
      return;
    }
    stateNew=stateOld.toWake();
  }
 while (!_stateInRef.compareAndSet(stateOld,stateNew));
  if (stateOld == StateInPipe.IDLE) {
    try (OutboxAmp outbox=OutboxAmp.currentOrCreate(_services)){
      Objects.requireNonNull(outbox);
      PipeWakeInMessage<T> msg=new PipeWakeInMessage<>(outbox,_inRef,this);
      outbox.offer(msg);
    }
   }
}

private void wakeIn ( ) { StateInPipe stateOld ; StateInPipe stateNew ; do { stateOld = _stateInRef . get ( ) ; if ( stateOld . isActive ( ) ) { return ; } stateNew = stateOld . toWake ( ) ; } while ( ! _stateInRef . compareAndSet ( stateOld , stateNew ) ) ; if ( stateOld == StateInPipe . IDLE ) { try ( OutboxAmp outbox = OutboxAmp . currentOrCreate ( _services ) ) { Objects . requireNonNull ( outbox ) ; PipeWakeInMessage < T > msg = new PipeWakeInMessage < > ( outbox , _inRef , this ) ; outbox . offer ( msg ) ; } } }
notify the reader of available data in the pipe . if the writer is asleep , wake it .
