10611062106310641065106610671068106910701071
synchronized( threadRunning ) { if( threadRunning.isSet() ) { // i.e. premature dialog cancel keepThreadRunning.set( false ); try { threadRunning.wait(); } catch( InterruptedException e1 ) { /* ignore */ } return; } }