mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[216252] canceled --> cancelled in comments
This commit is contained in:
parent
a2a2105997
commit
71fbaa7e47
2 changed files with 51 additions and 51 deletions
|
@ -48,17 +48,17 @@ public final class RSEInitJob extends Job {
|
|||
private static RSEInitJob instance = new RSEInitJob();
|
||||
|
||||
private class Phase {
|
||||
private volatile boolean isCanceled = false;
|
||||
private volatile boolean isCancelled = false;
|
||||
private volatile boolean isComplete = false;
|
||||
private int phaseNumber = 0;
|
||||
public Phase(int phaseNumber) {
|
||||
this.phaseNumber = phaseNumber;
|
||||
}
|
||||
public synchronized void waitForCompletion() throws InterruptedException {
|
||||
while (!isComplete && !isCanceled) {
|
||||
while (!isComplete && !isCancelled) {
|
||||
wait();
|
||||
}
|
||||
if (isCanceled) {
|
||||
if (isCancelled) {
|
||||
throw new InterruptedException();
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public final class RSEInitJob extends Job {
|
|||
notifyListeners(phaseNumber);
|
||||
}
|
||||
public synchronized void cancel() {
|
||||
isCanceled = true;
|
||||
isCancelled = true;
|
||||
notifyAll();
|
||||
}
|
||||
public boolean isComplete() {
|
||||
|
|
|
@ -90,8 +90,8 @@ public class Mutex {
|
|||
long timeLeft = timeout;
|
||||
long pollTime = (monitor!=null) ? 1000 : timeLeft;
|
||||
long nextProgressUpdate = start+500;
|
||||
boolean canceled = false;
|
||||
while (timeLeft>0 && !canceled && !lockAcquired) {
|
||||
boolean cancelled = false;
|
||||
while (timeLeft > 0 && !cancelled && !lockAcquired) {
|
||||
//is it my turn yet? Check wait queue and wait
|
||||
synchronized(fWaitQueue) {
|
||||
if (!fLocked && fWaitQueue.get(0) == myself) {
|
||||
|
@ -115,8 +115,8 @@ public class Mutex {
|
|||
long curTime = System.currentTimeMillis();
|
||||
timeLeft = start + timeout - curTime;
|
||||
if (monitor!=null) {
|
||||
canceled = monitor.isCanceled();
|
||||
if (!canceled && (curTime>nextProgressUpdate)) {
|
||||
cancelled = monitor.isCanceled();
|
||||
if (!cancelled && (curTime > nextProgressUpdate)) {
|
||||
monitor.worked(1);
|
||||
nextProgressUpdate+=1000;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue