This commit is contained in:
Looly
2021-08-30 12:09:58 +08:00
parent 9ba4b008b2
commit cc6a1cec54
3 changed files with 3 additions and 2 deletions

View File

@@ -397,7 +397,7 @@ public class Scheduler implements Serializable {
try {
checkStarted();
if(null != this.threadExecutor){
if(null == this.threadExecutor){
// 无界线程池,确保每一个需要执行的线程都可以及时运行,同时复用已有线程避免线程重复创建
this.threadExecutor = ExecutorBuilder.create().useSynchronousQueue().setThreadFactory(//
ThreadFactoryBuilder.create().setNamePrefix("hutool-cron-").setDaemon(this.daemon).build()//

View File

@@ -38,7 +38,7 @@ public class CronTest {
ThreadUtil.waitForDie();
CronUtil.stop();
}
@Test
@Ignore
public void cronWithListenerTest() {