public class ThreadFactoryTracker extends java.lang.Object implements java.util.concurrent.ThreadFactory
All user threads are interrupted when the tracker is shutdown.
Runnable implementations (see
Source) must exit the task
if the current thread is interrupted. A handler which notifies the
Executable is invoked when a user thread abruptly terminates due
to an uncaught exception.
ThreadFactory is provided, then this object uses the
factory returned by
|Modifier and Type||Method and Description|
Check to see if there are non daemon user threads that have not yet completed.
Return a thread.
This initiates an orderly shutdown in which no new tasks will be accepted but previously submitted tasks continue to be executed.
Interrupts all user treads and briefly waits for each thread to finish execution.
public java.lang.Thread newThread(java.lang.Runnable r)
public void shutdown()
public void shutdownNow()
InterruptedExceptionand exit the task.
public boolean hasActiveNonDaemonThreads()
trueif there are active non daemon threads, false otherwise.
Copyright © 2017 The Apache Software Foundation. All Rights Reserved - 4744f56-20170226-1707