in activeio-core/src/main/java/org/apache/activeio/xnet/ServicePool.java [39:57]
public ServicePool(ServerService next, final String name, final int threads, final long keepAliveTime) {
this.next = next;
ThreadPoolExecutor p = new ThreadPoolExecutor(threads, threads, keepAliveTime, TimeUnit.MILLISECONDS, new LinkedBlockingQueue());
p.setThreadFactory(new ThreadFactory() {
private volatile int id = 0;
public Thread newThread(Runnable arg0) {
Thread thread = new Thread(arg0, name + " " + getNextID());
return thread;
}
private int getNextID() {
return id++;
}
});
executor = p;
}