public class NamedDefaultThreadFactory extends Object implements ThreadFactory
ThreadFactory
that is based off of the default implementation in the java libraries
except that it inserts a custom name instead of a pool number. The name is also sequenced with a number to allow
for multiple pools with the same name to be created and still be distinguishable from each other. A threadsafe cache
is used to keep track of the sequence number for any given name.Modifier and Type | Method and Description |
---|---|
Thread |
newThread(Runnable r) |
static NamedDefaultThreadFactory |
of(String name) |
public static NamedDefaultThreadFactory of(String name)
public Thread newThread(Runnable r)
newThread
in interface ThreadFactory
Copyright © 2024. All rights reserved.