Class SimpleThreadFactory
- java.lang.Object
-
- nonapi.io.github.classgraph.concurrency.SimpleThreadFactory
-
- All Implemented Interfaces:
java.util.concurrent.ThreadFactory
public class SimpleThreadFactory extends java.lang.Object implements java.util.concurrent.ThreadFactory
Simple implementation of a thread factory.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
daemon
Whether to set daemon mode.private static java.util.concurrent.atomic.AtomicInteger
threadIdx
The thread index counter, used for assigning unique thread ids.private java.lang.String
threadNamePrefix
The thread name prefix.
-
Constructor Summary
Constructors Constructor Description SimpleThreadFactory(java.lang.String threadNamePrefix, boolean daemon)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Thread
newThread(java.lang.Runnable runnable)
New thread.
-
-
-
Field Detail
-
threadNamePrefix
private final java.lang.String threadNamePrefix
The thread name prefix.
-
threadIdx
private static final java.util.concurrent.atomic.AtomicInteger threadIdx
The thread index counter, used for assigning unique thread ids.
-
daemon
private final boolean daemon
Whether to set daemon mode.
-
-