mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Further simplification of PDOMManager.joinIndexer method.
This commit is contained in:
parent
daa4ee9838
commit
6016312946
1 changed files with 2 additions and 3 deletions
|
@ -1092,13 +1092,12 @@ public class PDOMManager implements IWritableIndexManager, IListener {
|
||||||
assert monitor != null;
|
assert monitor != null;
|
||||||
long deadline = waitMaxMillis == FOREVER ? Long.MAX_VALUE : System.currentTimeMillis() + waitMaxMillis;
|
long deadline = waitMaxMillis == FOREVER ? Long.MAX_VALUE : System.currentTimeMillis() + waitMaxMillis;
|
||||||
|
|
||||||
final boolean[] idleCondition = { false };
|
final boolean[] idleCondition = { false };
|
||||||
JobChangeAdapter listener = new JobChangeAdapter() {
|
JobChangeAdapter listener = new JobChangeAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void done(IJobChangeEvent event) {
|
public void done(IJobChangeEvent event) {
|
||||||
synchronized (idleCondition) {
|
synchronized (idleCondition) {
|
||||||
Job[] jobs = Job.getJobManager().find(PDOMManager.this);
|
if (Job.getJobManager().find(PDOMManager.this).length == 0) {
|
||||||
if (jobs.length == 0 || jobs.length == 1 && event.getJob() == jobs[0]) {
|
|
||||||
idleCondition[0] = true;
|
idleCondition[0] = true;
|
||||||
idleCondition.notifyAll();
|
idleCondition.notifyAll();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue