* PRNG, LogWriter: Use I2PThread to catch OOM

This commit is contained in:
zzz
2012-10-02 12:38:05 +00:00
parent 83fe635438
commit 07b3c8a7b4
2 changed files with 4 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ import java.util.Map;
import java.util.concurrent.LinkedBlockingQueue;
import net.i2p.I2PAppContext;
import net.i2p.util.I2PThread;
import net.i2p.util.Log;
/**
@@ -53,7 +54,7 @@ public class AsyncFortunaStandalone extends FortunaStandalone implements Runnabl
for (int i = 0; i < _bufferCount; i++)
_emptyBuffers.offer(new AsyncBuffer(_bufferSize));
_isRunning = true;
_refillThread = new Thread(this, "PRNG");
_refillThread = new I2PThread(this, "PRNG");
_refillThread.setDaemon(true);
_refillThread.setPriority(Thread.MIN_PRIORITY+1);
_refillThread.start();