public void sync() throws IOException {
  try {
    latch.await();
  }
 catch (  InterruptedException e) {
    Thread.interrupted();
    throw IOExceptionSupport.create(e);
  }
  failOnError();
}

public void sync ( ) throws IOException { try { latch . await ( ) ; } catch ( InterruptedException e ) { Thread . interrupted ( ) ; throw IOExceptionSupport . create ( e ) ; } failOnError ( ) ; }
waits for a response to some pending operation .
