mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-08 17:45:24 +02:00
added a wait() to ensure poll query job completes before the next gets executed.
Fix for 150953
This commit is contained in:
parent
92c597cd0f
commit
c1d279a102
1 changed files with 15 additions and 4 deletions
|
@ -105,10 +105,10 @@ FocusListener
|
||||||
{
|
{
|
||||||
Thread.sleep(interval);
|
Thread.sleep(interval);
|
||||||
doQuery();
|
doQuery();
|
||||||
while (_querying)
|
// while (_querying)
|
||||||
{
|
// {
|
||||||
Thread.sleep(100);
|
// Thread.sleep(100);
|
||||||
}
|
// }
|
||||||
doRedraw();
|
doRedraw();
|
||||||
}
|
}
|
||||||
catch (InterruptedException e)
|
catch (InterruptedException e)
|
||||||
|
@ -124,6 +124,7 @@ FocusListener
|
||||||
|
|
||||||
protected void doQuery()
|
protected void doQuery()
|
||||||
{
|
{
|
||||||
|
|
||||||
Display display = Display.getDefault();
|
Display display = Display.getDefault();
|
||||||
if (display != null && !_querying)
|
if (display != null && !_querying)
|
||||||
{
|
{
|
||||||
|
@ -160,7 +161,17 @@ FocusListener
|
||||||
};
|
};
|
||||||
|
|
||||||
job.schedule();
|
job.schedule();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
job.wait();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doRedraw()
|
protected void doRedraw()
|
||||||
|
|
Loading…
Add table
Reference in a new issue