forked from I2P_Developers/i2p.i2p
This is just a simple workaround, root cause unknown. May need tuning.
This commit is contained in:
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 15;
|
||||
public final static long BUILD = 16;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "";
|
||||
|
@ -277,7 +277,19 @@ class EventPumper implements Runnable {
|
||||
} catch (ClosedSelectorException cse) {
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
// another 100% CPU workaround
|
||||
if ((loopCount % 128) == 127) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("EventPumper throttle " + loopCount + " loops in " +
|
||||
(System.currentTimeMillis() - lastFailsafeIteration) + " ms");
|
||||
try {
|
||||
Thread.sleep(25);
|
||||
} catch (InterruptedException ie) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Clear the cache if the user changes the setting,
|
||||
// so we can test the effect.
|
||||
boolean newUseDirect = _context.getBooleanProperty(PROP_DIRECT);
|
||||
|
Reference in New Issue
Block a user