public synchronized void abort ( Throwable cause ) { if ( cause == null ) throw new IllegalArgumentException ( ) ; if ( aborted != null ) return ; // already aborted aborted = cause ; startLatch . abort ( cause ) ; endLatch . abort ( cause ) ; Thread c = Thread . currentThread ( ) ; for ( WorkUnit wu : workUnits ) { Executor e = wu . getExecutor ( ) ; if ( e != null && e != c ) e . interrupt ( ) ; } }
When one of the work unit is aborted call this method to abort all the other work units .