mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
RetryableTask: 避免最后一次任务执行时的线程睡眠
This commit is contained in:
@@ -236,8 +236,11 @@ public class RetryableTask<T> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 避免最后一次任务执行时的线程睡眠
|
||||||
|
if (this.maxAttempts > 0) {
|
||||||
ThreadUtil.sleep(delay.toMillis());
|
ThreadUtil.sleep(delay.toMillis());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.throwable = th;
|
this.throwable = th;
|
||||||
return this;
|
return this;
|
||||||
|
Reference in New Issue
Block a user