question: public synchronized void waitForSubmittedTasks ( ) throws InterruptedException { while ( currentTaskCount . get ( ) > 0 ) { waitForSingleTask ( ) ; } }
target:  Waits for all tasks that have been previously submitted to the pool to finish.