mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 15:15:25 +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);
|
||||
doQuery();
|
||||
while (_querying)
|
||||
{
|
||||
Thread.sleep(100);
|
||||
}
|
||||
// while (_querying)
|
||||
// {
|
||||
// Thread.sleep(100);
|
||||
// }
|
||||
doRedraw();
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
|
@ -124,6 +124,7 @@ FocusListener
|
|||
|
||||
protected void doQuery()
|
||||
{
|
||||
|
||||
Display display = Display.getDefault();
|
||||
if (display != null && !_querying)
|
||||
{
|
||||
|
@ -160,7 +161,17 @@ FocusListener
|
|||
};
|
||||
|
||||
job.schedule();
|
||||
|
||||
try
|
||||
{
|
||||
job.wait();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void doRedraw()
|
||||
|
|
Loading…
Add table
Reference in a new issue