1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

[231126] [dstore] status monitor needs to reset WaitThreshold on nudge

This commit is contained in:
David McKnight 2008-05-09 14:28:28 +00:00
parent e5a8994a2c
commit 79297e1b52
3 changed files with 9 additions and 7 deletions

View file

@ -287,13 +287,14 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
Display display = Display.getCurrent();
// Prevent infinite looping by introducing a threshold for wait
final int initialWaitThreshold = 50;
int WaitThreshold = initialWaitThreshold;
int WaitThreshold = 50;
if ( wait > 0 )
WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
else if ( wait == -1 ) // force a diagnostic
WaitThreshold = -1;
int initialWaitThreshold = WaitThreshold;
int nudges = 0; // nudges used for waking up server with slow connections
// nudge up to 12 times before giving up

View file

@ -255,13 +255,13 @@ public class DStoreStatusMonitor implements IDomainListener
// Prevent infinite looping by introducing a threshold for wait
final int initialWaitThreshold = 50;
int WaitThreshold = initialWaitThreshold;
int WaitThreshold = 50;
if ( wait > 0 )
WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
else if ( wait == -1 ) // force a diagnostic
WaitThreshold = -1;
int initialWaitThreshold = WaitThreshold;
int nudges = 0; // nudges used for waking up server with slow connections
// nudge up to 12 times before giving up

View file

@ -235,14 +235,15 @@ public class DownloadListener implements IDomainListener
public DataElement waitForUpdate(int wait) throws InterruptedException
{
// Prevent infinite looping by introducing a threshold for wait
final int initialWaitTheshold = 50;
int WaitThreshold = initialWaitTheshold;
int WaitThreshold = 50;
if (wait > 0)
WaitThreshold = wait * 10; // 1 second means 10 sleep(100ms)
else if (wait == -1) // force a diagnostic
WaitThreshold = -1;
int initialWaitTheshold = WaitThreshold;
{
// Current thread is not UI thread
while (!_isDone && !_isCancelled && !_networkDown)