3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

Lower the priority of the PeerGroup thread and daemonize it.

This commit is contained in:
Mike Hearn 2012-03-02 15:32:58 +01:00
parent 0b20b47c0c
commit 0d195e17c8

View File

@ -395,6 +395,9 @@ public class PeerGroup {
public PeerGroupThread() {
super("Peer group thread");
tasks = new LinkedBlockingQueue<FutureTask>();
// Ensure we don't fight with UI threads.
setPriority(Math.max(Thread.MIN_PRIORITY, Thread.currentThread().getPriority() - 1));
setDaemon(true);
}
public void run() {