public void await ( ) { if ( interrupted . get ( ) ) { return ; } try { mainLatch . await ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; } }
Wait until a proper shutdown command is received then return .