DefaultThreadFactory(int threadPriority, String threadNamePrefix) {
   this.threadPriority = threadPriority;
   SecurityManager s = System.getSecurityManager();
   group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
   namePrefix = threadNamePrefix + poolNumber.getAndIncrement() + "-thread-";
 }
示例#2
0
 WesttyThreadFactory() {
   SecurityManager s = System.getSecurityManager();
   group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
   namePrefix = "westty-pool-" + poolNumber.getAndIncrement() + "-thread-";
 }