3
0
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:
Mike Hearn 2011-09-10 09:56:34 +00:00
parent 24b87d8d6e
commit 133dad7305

View File

@ -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;
}