ThreadPool
Thread pool implementation in java.
Introduction
Details
Please make sure you got a copy of GNU GPL licence V3 along with the source code.
import java.util.*;
public class ThreadPool implements Runnable {
public static int POOL_SIZE = 2;// Default pool size
public static int POOL_STATUS_CHECK_TIME = 1000;//In milli seconds
private List
private Thread self;
public ThreadPool() {
....
}
public ThreadPool(int size) {
....
}
public void addThreadToPool(Runnable th) {
.......
}
public void kickStart() {
.....
}
public void run() {
.........
}
public boolean isPoolAlive() {
........
}
private void pausePool() {
........
}
}
