FileDocCategorySizeDatePackage
NamedThreadFactory.javaAPI DocAndroid 5.1 API1396Thu Mar 12 22:22:50 GMT 2015com.android.bitmap

NamedThreadFactory

public class NamedThreadFactory extends Object implements ThreadFactory

Fields Summary
private final ThreadFactory
mDefaultThreadFactory
private final String
mBaseName
private final AtomicInteger
mCount
Constructors Summary
public NamedThreadFactory(String baseName)


        
        mDefaultThreadFactory = Executors.defaultThreadFactory();
        mBaseName = baseName;
    
Methods Summary
public java.lang.ThreadnewThread(java.lang.Runnable runnable)

        final Thread thread = mDefaultThreadFactory.newThread(runnable);
        thread.setName(mBaseName + "-" + mCount.getAndIncrement());
        return thread;