name all threads, and (nearly) always use I2PThread (in case we add some pooling/throttling/monitoring or whatnot later)

This commit is contained in:
jrandom
2004-04-09 01:22:04 +00:00
committed by zzz
parent 6b1d671aed
commit f37c0ed612
9 changed files with 20 additions and 11 deletions

View File

@ -14,6 +14,7 @@ import net.i2p.util.RandomSource;
import net.i2p.util.Log;
import net.i2p.util.NativeBigInteger;
import net.i2p.util.Clock;
import net.i2p.util.I2PThread;
import java.math.BigInteger;
import java.util.ArrayList;
@ -84,7 +85,7 @@ public class DHSessionKeyBuilder {
if (_log.shouldLog(Log.DEBUG)) _log.debug("DH Precalc (minimum: " + MIN_NUM_BUILDERS + " max: " + MAX_NUM_BUILDERS + ", delay: " + CALC_DELAY + ")");
_precalcThread = new Thread(new DHSessionKeyBuilderPrecalcRunner(MIN_NUM_BUILDERS, MAX_NUM_BUILDERS));
_precalcThread = new I2PThread(new DHSessionKeyBuilderPrecalcRunner(MIN_NUM_BUILDERS, MAX_NUM_BUILDERS));
_precalcThread.setName("DH Precalc");
_precalcThread.setDaemon(true);
_precalcThread.setPriority(Thread.MIN_PRIORITY);

View File

@ -14,6 +14,7 @@ import java.util.List;
import net.i2p.util.Clock;
import net.i2p.util.Log;
import net.i2p.util.I2PThread;
import net.i2p.util.NativeBigInteger;
import net.i2p.util.RandomSource;
@ -78,7 +79,7 @@ class YKGenerator {
if (_log.shouldLog(Log.DEBUG)) _log.debug("ElGamal YK Precalc (minimum: " + MIN_NUM_BUILDERS + " max: " + MAX_NUM_BUILDERS + ", delay: " + CALC_DELAY + ")");
_precalcThread = new Thread(new YKPrecalcRunner(MIN_NUM_BUILDERS, MAX_NUM_BUILDERS));
_precalcThread = new I2PThread(new YKPrecalcRunner(MIN_NUM_BUILDERS, MAX_NUM_BUILDERS));
_precalcThread.setName("YK Precalc");
_precalcThread.setDaemon(true);
_precalcThread.setPriority(Thread.MIN_PRIORITY);