@InternalApi(value="For internal usage only") public class ThreadUtil extends Object
ThreadFactory
that's safe to use in App Engine.
This class copies code that originates in GrpcUtil.getThreadFactory(String, boolean)
.
For internal use only - public for technical reasons.
Constructor and Description |
---|
ThreadUtil() |
Modifier and Type | Method and Description |
---|---|
static ThreadFactory |
getThreadFactory(String nameFormat,
boolean daemon)
Get a
ThreadFactory suitable for use in the current environment. |
public static ThreadFactory getThreadFactory(String nameFormat, boolean daemon)
ThreadFactory
suitable for use in the current environment.nameFormat
- to apply to threads created by the factory.daemon
- true
if the threads the factory creates are daemon threads, false
otherwise.ThreadFactory
.