SyncFinisher增加setExecutorService方法(issue#IANKQ1@Gitee)

This commit is contained in:
Looly 2024-09-03 11:39:58 +08:00
parent dbd92814db
commit f1bc355ff0
3 changed files with 15 additions and 1 deletions

View File

@ -5,6 +5,8 @@
# 5.8.33(2024-09-02)
### 🐣新特性
* 【core 】 SyncFinisher增加setExecutorService方法issue#IANKQ1@Gitee
### 🐞Bug修复
* 【json 】 修复JSONConfig.setDateFormat设置后toBean无效问题issue#3713@Gitee

View File

@ -1093,7 +1093,7 @@ public class DateTime extends Date {
// issue#3713 尝试使用US Locale解析
try {
DateUtil.newSimpleFormat(pattern, Locale.US, null).parse(dateStr.toString());
return DateUtil.newSimpleFormat(pattern, Locale.US, null).parse(dateStr.toString());
} catch (Exception ignore) {
// ignore
}

View File

@ -57,6 +57,18 @@ public class SyncFinisher implements Closeable {
this.workers = new LinkedHashSet<>();
}
/**
* 设置自定义线程池默认为{@link ExecutorBuilder}创建的线程池
*
* @param executorService 线程池
* @return this
* @since 5.8.33
*/
public SyncFinisher setExecutorService(ExecutorService executorService) {
this.executorService = executorService;
return this;
}
/**
* 设置是否所有worker线程同时开始
*