Executorexecute
ExecutorCompletionService
返回一个Future
executor要execute一个Runnable
RunnableFuture
executor要submit一个Callable
CompletionServicenewTaskForsubmittakepoll结合了Executor和BlockingQueue,用队列操纵线程返回的结果
Executors 添加线程池功能newFixedThreadPoolnewFixedCachedThreadPoolcallable?
ThreadjoinwaitsleeprunstartresumedestroyexitinterruptisAliveisDaemonyield
RunnableRun不能带回返回值
FuturegetcancelisCancelledisDone
Callable能带回返回值
FutureTaskgetrunsetisCancelledisDonedonecancel