* Set the countdown latch back to 1 so the analysis can be executed again
*/
protected void resetAnalysis() {
+ fFinishedLatch.countDown();
fFinishedLatch = new CountDownLatch(1);
}
@Override
public boolean waitForCompletion(IProgressMonitor monitor) {
try {
- while (!fFinishedLatch.await(1, TimeUnit.MILLISECONDS)) {
- if (monitor.isCanceled()) {
+ while (!fFinishedLatch.await(500, TimeUnit.MILLISECONDS)) {
+ if (fAnalysisCancelled || monitor.isCanceled()) {
fAnalysisCancelled = true;
return false;
}