mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-03-10 09:20:04 +01:00
Lower the priority of the PeerGroup thread and daemonize it.
This commit is contained in:
parent
0b20b47c0c
commit
0d195e17c8
1 changed files with 3 additions and 0 deletions
|
@ -395,6 +395,9 @@ public class PeerGroup {
|
||||||
public PeerGroupThread() {
|
public PeerGroupThread() {
|
||||||
super("Peer group thread");
|
super("Peer group thread");
|
||||||
tasks = new LinkedBlockingQueue<FutureTask>();
|
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() {
|
public void run() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue