Changeset bf45e31


Ignore:
Timestamp:
Dec 17, 2011 1:55:45 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4884148
Parents:
1488cd0
Message:
  • GeoIP: Reduce thread priority during lookup
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/GeoIP.java

    r1488cd0 rbf45e31  
    9999            return;
    100100        }
    101         LookupJob j = new LookupJob();
    102         j.run();
    103         updateOurCountry();
     101        int pri = Thread.currentThread().getPriority();
     102        if (pri > Thread.MIN_PRIORITY)
     103            Thread.currentThread().setPriority(pri - 1);
     104        try {
     105            LookupJob j = new LookupJob();
     106            j.run();
     107            updateOurCountry();
     108        } finally {
     109            if (pri > Thread.MIN_PRIORITY)
     110                Thread.currentThread().setPriority(pri);
     111        }
    104112    }
    105113
Note: See TracChangeset for help on using the changeset viewer.