Package | Description |
---|---|
cn.hutool.core.thread |
提供线程及高并发封装,入口为ThreadUtil
|
Modifier and Type | Method and Description |
---|---|
SyncFinisher |
SyncFinisher.addRepeatWorker(Runnable runnable)
增加定义的线程数同等数量的worker
|
SyncFinisher |
SyncFinisher.addWorker(Runnable runnable)
增加工作线程
|
SyncFinisher |
SyncFinisher.addWorker(SyncFinisher.Worker worker)
增加工作线程
|
SyncFinisher |
SyncFinisher.setBeginAtSameTime(boolean isBeginAtSameTime)
设置是否所有worker线程同时开始
|
SyncFinisher |
SyncFinisher.setExceptionHandler(Thread.UncaughtExceptionHandler exceptionHandler)
设置异常处理
|
SyncFinisher |
SyncFinisher.setExecutorService(ExecutorService executorService)
设置自定义线程池,默认为
ExecutorBuilder 创建的线程池 |
Copyright © 2024. All rights reserved.