1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 503036 - Fix deadlock caused by previous fix.

Change-Id: Ic333a7f0230e6a28033fd6659408895b34f5b70e
This commit is contained in:
Doug Schaefer 2016-10-14 11:28:27 -04:00 committed by Gerrit Code Review @ Eclipse.org
parent 4d0a556446
commit e76ec05aab

View file

@ -86,7 +86,6 @@ public class BinaryRunner {
private final Job runnerJob; // final fields don't need synchronization
private IOutputEntry[] entries = new IOutputEntry[0];
private boolean isStopped= false; // access to isStopped must be synchronized.
private final static Object BINARY_RUNNER_FAMILY = new Object();
public BinaryRunner(IProject prj) {
cproject = CModelManager.getDefault().create(prj);
@ -136,11 +135,6 @@ public class BinaryRunner {
}
return status;
}
@Override
public boolean belongsTo(Object family) {
return family == BINARY_RUNNER_FAMILY;
}
};
job.setPriority(Job.LONG);
return job;
@ -159,7 +153,9 @@ public class BinaryRunner {
*/
public void waitIfRunning() {
try {
Job.getJobManager().join(BINARY_RUNNER_FAMILY, null);
if (runnerJob != null && !runnerJob.equals(Job.getJobManager().currentJob())) {
runnerJob.join();
}
} catch (InterruptedException e) {
}
}