!469 修复 [ConcurrencyTester类未关闭线程池] bug

Merge pull request !469 from 孙昊/v5-dev
This commit is contained in:
Looly 2021-11-24 07:15:03 +00:00 committed by Gitee
commit fa87bfd01a

View File

@ -40,10 +40,12 @@ public class ConcurrencyTester {
this.sf.clearWorker(); this.sf.clearWorker();
timeInterval.start(); timeInterval.start();
this.sf// this.sf
.addRepeatWorker(runnable)// .addRepeatWorker(runnable)
.setBeginAtSameTime(true)// 同时开始 .setBeginAtSameTime(true)
.start(); .start();
// 停止线程池释放资源避免空跑
this.sf.stop();
this.interval = timeInterval.interval(); this.interval = timeInterval.interval();
return this; return this;