[refactoring][minor] Replaced all tabs with four spaces.

This commit is contained in:
North 2012-06-19 23:50:20 +03:00
parent e646e4768d
commit 239a4fb100
2891 changed files with 79411 additions and 79411 deletions

View file

@ -12,43 +12,43 @@ import java.util.concurrent.TimeUnit;
*/
public class ThreadUtils {
static public ThreadPoolExecutor threadPool;
static public ThreadPoolExecutor threadPool;
static public ThreadPoolExecutor threadPool2;
static private int threadCount;
static {
threadPool = new ThreadPoolExecutor(4, 4, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
public Thread newThread (Runnable runnable) {
threadCount++;
Thread thread = new Thread(runnable, "Util" + threadCount);
thread.setDaemon(true);
return thread;
}
});
threadPool.prestartAllCoreThreads();
static private int threadCount;
static {
threadPool = new ThreadPoolExecutor(4, 4, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
public Thread newThread (Runnable runnable) {
threadCount++;
Thread thread = new Thread(runnable, "Util" + threadCount);
thread.setDaemon(true);
return thread;
}
});
threadPool.prestartAllCoreThreads();
threadPool2 = new ThreadPoolExecutor(4, 4, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(), new ThreadFactory() {
public Thread newThread (Runnable runnable) {
threadCount++;
Thread thread = new Thread(runnable, "TP2" + threadCount);
thread.setDaemon(true);
return thread;
}
});
threadPool2.prestartAllCoreThreads();
}
public Thread newThread (Runnable runnable) {
threadCount++;
Thread thread = new Thread(runnable, "TP2" + threadCount);
thread.setDaemon(true);
return thread;
}
});
threadPool2.prestartAllCoreThreads();
}
static public void sleep (int millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException ignored) {
}
}
static public void sleep (int millis) {
try {
Thread.sleep(millis);
} catch (InterruptedException ignored) {
}
}
static public void wait (Object lock) {
synchronized (lock) {
try {
lock.wait();
} catch (InterruptedException ex) {
}
}
}
static public void wait (Object lock) {
synchronized (lock) {
try {
lock.wait();
} catch (InterruptedException ex) {
}
}
}
}