Class DaemonThreadFactory

  • All Implemented Interfaces:
    ThreadFactory

    public class DaemonThreadFactory
    extends Object
    implements ThreadFactory
    ThreadFactory for Daemon threads.

    Daemon threads do not stop a JVM stopping. If an application only has Daemon threads left it will shutdown.

    In using Daemon threads you need to either not care about being interrupted on shutdown or register with the JVM shutdown hook to perform a nice shutdown of the daemon threads etc.

    Author:
    rbygrave