1
0
Fork 0
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:
David McKnight 2006-07-31 17:21:36 +00:00
parent 92c597cd0f
commit c1d279a102

View file

@ -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()