public boolean cancel ( int timeout , TimeUnit timeoutUnit ) throws InterruptedException { if ( isCanceled ( ) ) { return true ; } cancelLatch . countDown ( ) ; try { return doneLatch . await ( timeout , timeoutUnit ) ; } finally { new DefaultCurrentProcess ( ) . infanticide ( ) ; } }
Cancel build and wait for build session done