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-";
 }
Esempio n. 2
0
 WesttyThreadFactory() {
   SecurityManager s = System.getSecurityManager();
   group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
   namePrefix = "westty-pool-" + poolNumber.getAndIncrement() + "-thread-";
 }