mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-30 23:02:15 +00:00
Tweak PeerGroup thread priority. Resolves issue 67.
This commit is contained in:
parent
24b87d8d6e
commit
133dad7305
@ -402,7 +402,7 @@ public class PeerGroup {
|
||||
// Lower the priority of the peer threads. This is to avoid competing with UI threads created by the API
|
||||
// user when doing lots of work, like downloading the block chain. We select a priority level one lower
|
||||
// than the parent thread, or the minimum.
|
||||
t.setPriority(Math.max(Thread.MIN_PRIORITY, group.getMaxPriority() - 1));
|
||||
t.setPriority(Math.max(Thread.MIN_PRIORITY, Thread.currentThread().getPriority() - 1));
|
||||
t.setDaemon(true);
|
||||
return t;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user