public void shutdownAndWaitUntilDone ( ) { shutdown ( ) ; while ( true ) { synchronized ( endSignal ) { try { if ( ( combinedState . get ( ) & 0x7FFFFFFFFFFFFFFF L ) == 0 ) break ; endSignal . wait ( 100 ) ; } catch ( InterruptedException e ) { // ignore } } } }
Shuts down the executor and blocks until all tasks have completed execution