Class DaemonThreadFactory

java.lang.Object
com.yahoo.concurrent.DaemonThreadFactory
All Implemented Interfaces:
ThreadFactory

public class DaemonThreadFactory extends Object implements ThreadFactory
A simple thread factory that decorates Executors.defaultThreadFactory() and sets all created threads to be daemon threads.
Author:
Einar M R Rosenvinge
  • Constructor Details

    • DaemonThreadFactory

      public DaemonThreadFactory()
      Creates a deamon thread factory that creates threads with the default names provided by Executors.defaultThreadFactory().
    • DaemonThreadFactory

      public DaemonThreadFactory(String prefix)
      Creates a deamon thread factory that creates threads with the default names provided by Executors.defaultThreadFactory() prepended by the specified prefix.
      Parameters:
      prefix - the thread name prefix to use
  • Method Details