×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: Java
Posted by: Gerrit Viljoen
Added: Nov 9, 2014 10:10 AM
Modified: Nov 9, 2014 10:11 AM
Views: 22
Daemon Thread Factory implementation.
  1.     private static final ThreadFactory daemonThreadFactory = new ThreadFactory() {
  2.         public Thread newThread(Runnable run) {
  3.             Thread thread = new Thread(run);
  4.             thread.setDaemon(true);
  5.             return thread;
  6.         }
  7.     };