public class NamedThreadFactory extends Object implements ThreadFactory
| 限定符和类型 | 字段和说明 |
|---|---|
protected boolean |
mDaemon |
protected ThreadGroup |
mGroup |
protected String |
mPrefix |
protected AtomicInteger |
mThreadNum |
protected static AtomicInteger |
POOL_SEQ |
| 构造器和说明 |
|---|
NamedThreadFactory() |
NamedThreadFactory(String prefix) |
NamedThreadFactory(String prefix,
boolean daemon) |
protected static final AtomicInteger POOL_SEQ
protected final AtomicInteger mThreadNum
protected final String mPrefix
protected final boolean mDaemon
protected final ThreadGroup mGroup
public NamedThreadFactory()
public NamedThreadFactory(String prefix)
public NamedThreadFactory(String prefix, boolean daemon)
public Thread newThread(Runnable runnable)
newThread 在接口中 ThreadFactorypublic ThreadGroup getThreadGroup()
Copyright © 2022. All rights reserved.