Class DaemonThreadFactory

java.lang.Object
org.pgcodekeeper.core.utils.DaemonThreadFactory
All Implemented Interfaces:
ThreadFactory

public class DaemonThreadFactory extends Object implements ThreadFactory
For thread pools that shouldn't prevent normal program shutdown.
Author:
levsha_aa
  • Constructor Details

    • DaemonThreadFactory

      public DaemonThreadFactory()
  • Method Details

    • newThread

      public Thread newThread(Runnable r)
      Creates a new daemon thread to run the given task.
      Specified by:
      newThread in interface ThreadFactory
      Parameters:
      r - the runnable task to be executed by the new thread
      Returns:
      a new daemon thread configured to run the given task