use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class AsyncFortunaStandalone method startup.
public void startup() {
for (int i = 0; i < _bufferCount; i++) _emptyBuffers.offer(new AsyncBuffer(_bufferSize));
_isRunning = true;
_refillThread = new I2PThread(this, "PRNG");
_refillThread.setDaemon(true);
_refillThread.setPriority(Thread.NORM_PRIORITY - 2);
_refillThread.start();
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class AdminListener method runConnection.
/**
* Handle the connection by passing it off to an AdminRunner
*/
protected void runConnection(Socket socket) throws IOException {
AdminRunner runner = new AdminRunner(_context, socket);
I2PThread t = new I2PThread(runner);
t.setName("Admin Runner");
// t.setPriority(Thread.MIN_PRIORITY);
t.setDaemon(true);
t.start();
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class AdminManager method startup.
private void startup(int port) {
if (_listener == null) {
_listener = new AdminListener(_context, port);
I2PThread t = new I2PThread(_listener);
t.setName("Admin Listener:" + port);
t.setDaemon(true);
// t.setPriority(Thread.MIN_PRIORITY);
t.start();
} else {
_listener.setPort(port);
_listener.restart();
}
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class YKGenerator method start.
/**
* Start the background precalc thread.
* Must be called for normal operation.
* If not called, all generation happens in the foreground.
* Not required for unit tests.
*
* @since 0.9.14
*/
public synchronized void start() {
if (_isRunning)
return;
_precalcThread = new I2PThread(new YKPrecalcRunner(MIN_NUM_BUILDERS, MAX_NUM_BUILDERS), "YK Precalc", true);
_precalcThread.setPriority(Thread.NORM_PRIORITY - 2);
_isRunning = true;
_precalcThread.start();
}
use of net.i2p.util.I2PThread in project i2p.i2p by i2p.
the class Reader method startReading.
public synchronized void startReading(int numReaders) {
for (int i = 1; i <= numReaders; i++) {
Runner r = new Runner();
I2PThread t = new I2PThread(r, "NTCP reader " + i + '/' + numReaders, true);
_runners.add(r);
t.start();
}
}
Aggregations