Class SimpleThreadFactory

java.lang.Object
nonapi.io.github.classgraph.concurrency.SimpleThreadFactory
All Implemented Interfaces:
ThreadFactory

public class SimpleThreadFactory extends Object implements ThreadFactory
Simple implementation of a thread factory.
  • Field Details

    • threadNamePrefix

      private final String threadNamePrefix
      The thread name prefix.
    • threadIdx

      private static final AtomicInteger threadIdx
      The thread index counter, used for assigning unique thread ids.
    • daemon

      private final boolean daemon
      Whether to set daemon mode.
  • Constructor Details

    • SimpleThreadFactory

      SimpleThreadFactory(String threadNamePrefix, boolean daemon)
      Constructor.
      Parameters:
      threadNamePrefix - prefix for created threads.
      daemon - create daemon threads?
  • Method Details