Class DaemonThreadFactory

  • All Implemented Interfaces:

    public class DaemonThreadFactory
    extends java.lang.Object
    implements java.util.concurrent.ThreadFactory
    A thread factory that sets the threads to run as daemons. (Otherwise things that embed the threadpool can't shut themselves down).
    • Constructor Summary

      Constructor Description
      DaemonThreadFactory​(java.lang.String threadNamePrefix)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Thread newThread​(java.lang.Runnable r)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DaemonThreadFactory

        public DaemonThreadFactory​(java.lang.String threadNamePrefix)
    • Method Detail

      • newThread

        public java.lang.Thread newThread​(java.lang.Runnable r)
        Specified by:
        newThread in interface java.util.concurrent.ThreadFactory