public final class ThreadPool extends Object
NOT implement the Executor interface unless we see the necessity
| Modifier and Type | Class and Description |
|---|---|
static class |
ThreadPool.StatInfo |
| Constructor and Description |
|---|
ThreadPool(int initialThreadNum,
ThreadFactory threadFactory) |
ThreadPool(int initialThreadNum,
ThreadFactory threadFactory,
int queueSize) |
| Modifier and Type | Method and Description |
|---|---|
ThreadPool.StatInfo |
getStatInfo() |
boolean |
isStopped() |
void |
join() |
void |
stop() |
boolean |
submit(Runnable task) |
long |
submit(Runnable[] tasks,
int offset,
int len) |
public ThreadPool(int initialThreadNum,
ThreadFactory threadFactory)
public ThreadPool(int initialThreadNum,
ThreadFactory threadFactory,
int queueSize)
public void stop()
public void join()
public boolean submit(Runnable task)
public long submit(Runnable[] tasks, int offset, int len)
public ThreadPool.StatInfo getStatInfo()
public boolean isStopped()
Copyright © 2020 Baidu, Inc.. All rights reserved.