@Override public void run(){
  threads.fromNewToRunning(Thread.currentThread());
  r.run();
  threads.removeRunning(Thread.currentThread());
  if (!hasActiveNonDaemonThreads())   completer.accept(ThreadFactoryTracker.this,null);
}

@ Override public void run ( ) { threads . fromNewToRunning ( Thread . currentThread ( ) ) ; r . run ( ) ; threads . removeRunning ( Thread . currentThread ( ) ) ; if ( ! hasActiveNonDaemonThreads ( ) ) completer . accept ( ThreadFactoryTracker . this , null ) ; }
keep track of non - daemon threads so shutdown can wait for their termination .
