public static void waitUntilIdle ( ) { // Wait till we are all done long t0 = System . currentTimeMillis ( ) ; synchronized ( poolsIdle ) { while ( ! arePoolsIdle ( ) ) { try { poolsIdle . wait ( ) ; } catch ( InterruptedException e ) { logger . error ( "Failed to wait on termination condition: " + e . getMessage ( ) ) ; } } } long t1 = System . currentTimeMillis ( ) ; logger . info ( "Finished running " + GlobalState . agents . size ( ) + agentsIn + Log . formattedDuration ( t0 , t1 ) ) ; }
Blocks until all agents have finished executing plans and have gone idle .