forked from I2P_Developers/i2p.i2p
Transport: Raise bandwidth refiller thread priority
so I/O doesn't stall under high CPU load - Raise DH generator thread priority to keep DH building out of event pumper thread - Raise PRNG and YK generator thread priorites one notch - Set I2PThread priority in constructor Fixes problems mainly seen on Windows, which seems to be much more sensitive to priority settings
This commit is contained in:
@@ -98,7 +98,7 @@ public class FIFOBandwidthLimiter {
|
||||
_lastStatsUpdated = now();
|
||||
_refiller = new FIFOBandwidthRefiller(_context, this);
|
||||
_refillerThread = new I2PThread(_refiller, "BWRefiller", true);
|
||||
_refillerThread.setPriority(I2PThread.NORM_PRIORITY-1);
|
||||
_refillerThread.setPriority(I2PThread.NORM_PRIORITY + 1);
|
||||
_refillerThread.start();
|
||||
}
|
||||
|
||||
|
@@ -470,7 +470,8 @@ public class DHSessionKeyBuilder {
|
||||
_log.debug("DH Precalc (minimum: " + _minSize + " max: " + _maxSize + ", delay: "
|
||||
+ _calcDelay + ")");
|
||||
_builders = new LinkedBlockingQueue<DHSessionKeyBuilder>(_maxSize);
|
||||
setPriority(Thread.MIN_PRIORITY);
|
||||
if (!SystemVersion.isWindows())
|
||||
setPriority(Thread.NORM_PRIORITY - 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user