mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 503036 - Fix deadlock caused by previous fix.
Change-Id: Ic333a7f0230e6a28033fd6659408895b34f5b70e
This commit is contained in:
parent
4d0a556446
commit
e76ec05aab
1 changed files with 3 additions and 7 deletions
|
@ -86,7 +86,6 @@ public class BinaryRunner {
|
||||||
private final Job runnerJob; // final fields don't need synchronization
|
private final Job runnerJob; // final fields don't need synchronization
|
||||||
private IOutputEntry[] entries = new IOutputEntry[0];
|
private IOutputEntry[] entries = new IOutputEntry[0];
|
||||||
private boolean isStopped= false; // access to isStopped must be synchronized.
|
private boolean isStopped= false; // access to isStopped must be synchronized.
|
||||||
private final static Object BINARY_RUNNER_FAMILY = new Object();
|
|
||||||
|
|
||||||
public BinaryRunner(IProject prj) {
|
public BinaryRunner(IProject prj) {
|
||||||
cproject = CModelManager.getDefault().create(prj);
|
cproject = CModelManager.getDefault().create(prj);
|
||||||
|
@ -136,11 +135,6 @@ public class BinaryRunner {
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean belongsTo(Object family) {
|
|
||||||
return family == BINARY_RUNNER_FAMILY;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
job.setPriority(Job.LONG);
|
job.setPriority(Job.LONG);
|
||||||
return job;
|
return job;
|
||||||
|
@ -159,7 +153,9 @@ public class BinaryRunner {
|
||||||
*/
|
*/
|
||||||
public void waitIfRunning() {
|
public void waitIfRunning() {
|
||||||
try {
|
try {
|
||||||
Job.getJobManager().join(BINARY_RUNNER_FAMILY, null);
|
if (runnerJob != null && !runnerJob.equals(Job.getJobManager().currentJob())) {
|
||||||
|
runnerJob.join();
|
||||||
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue