Decrease latency before cancellation when multiple threads asking for checkCancelled concurrently.

This commit is contained in:
Maxim Shafirov
2009-11-03 16:17:23 +03:00
parent 2f43f34fd3
commit 86d7c5dfbd
2 changed files with 2 additions and 2 deletions
@@ -43,8 +43,8 @@ public abstract class ProgressManager {
public static void checkCanceled() throws ProcessCanceledException {
// smart optimization! There's a thread started in ProgressManagerImpl, that set's this flag up once in 10 milliseconds
if (ourNeedToCheckCancel) {
ourNeedToCheckCancel = false;
getInstance().doCheckCanceled();
ourNeedToCheckCancel = false;
}
}
@@ -85,7 +85,7 @@ public class ProgressManagerImpl extends ProgressManager {
}
else {
ourLockedCheckCounter = 0;
progress.checkCanceled();
throw e;
}
}
}