restore previous thread priority

This commit is contained in:
Eugene Zhuravlev
2012-06-23 15:16:51 +02:00
parent 9f7272e24d
commit 662a4195f3
@@ -314,16 +314,15 @@ public class FileUtil extends FileUtilRt {
final Runnable deleteFilesTask = new Runnable() {
public void run() {
final Thread currentThread = Thread.currentThread();
final int priority = currentThread.getPriority();
currentThread.setPriority(Thread.MIN_PRIORITY);
//ShutDownTracker.getInstance().registerStopperThread(currentThread);
try {
for (File tempFile : tempFiles) {
delete(tempFile);
}
}
finally {
//ShutDownTracker.getInstance().unregisterStopperThread(currentThread);
currentThread.setPriority(Thread.NORM_PRIORITY);
currentThread.setPriority(priority);
}
}
};