3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-14 11:15:51 +00:00

Lower the priority of the networking thread to avoid competing with UI threads.

This commit is contained in:
Mike Hearn 2014-01-15 15:11:31 +01:00
parent 8e58839d81
commit a9a7dd9e06

View File

@ -89,6 +89,7 @@ public class NioClientManager extends AbstractExecutionThreadService implements
@Override @Override
public void run() { public void run() {
try { try {
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
while (isRunning()) { while (isRunning()) {
SocketChannelAndParser conn; SocketChannelAndParser conn;
while ((conn = newConnectionChannels.poll()) != null) { while ((conn = newConnectionChannels.poll()) != null) {