(Runnable runnable)
| 58 | private static ThreadFactory createThreadFactory(final String format, final AtomicLong threadPoolCounter) { |
| 59 | return new ThreadFactory() { |
| 60 | public Thread newThread(Runnable runnable) { |
| 61 | Thread thread = new Thread(runnable); |
| 62 | thread.setName(String.format(format, threadPoolCounter.getAndIncrement())); |
| 63 | return thread; |
| 64 | } |
| 65 | }; |
| 66 | } |
| 67 |