src.java
Class DefaultThreadFactory
java.lang.Object
src.java.DefaultThreadFactory
- All Implemented Interfaces:
- java.util.concurrent.ThreadFactory
class DefaultThreadFactory
Provides a standard way to create new threads. The created threads get their daemons flags set as well as
their priority is set to Thread.MIN_PRIORITY.
Instance of this thread factory is used by the BackgroundThreadManager by default. You can supply your own
thread factory by altering the resources.groovy file the following way:
bgThreadFactory(my.package.MyThreadFactory)
Bear in mind that all created threads are required to have the uncaughtExceptionHandler property set
by the thread factory.
Methods inherited from class java.lang.Object
|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
handler
private def handler
-
threadIdSource
private final AtomicLong threadIdSource
-
DefaultThreadFactory
DefaultThreadFactory()
-
getExceptionHandler
public def getExceptionHandler()
-
newThread
public java.lang.Thread newThread(java.lang.Runnable r)
-
setExceptionHandler
@Required
public void setExceptionHandler(def newHandler)
-
Groovy Documentation