!613 refactor 优化代码

* update 优化代码
This commit is contained in:
DoubleH
2024-12-12 14:15:59 +00:00
committed by 疯狂的狮子Li
parent d7b0dc91d5
commit dd17246086
12 changed files with 27 additions and 45 deletions

View File

@ -14,18 +14,6 @@ import java.util.concurrent.*;
@Slf4j
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class Threads {
/**
* sleep等待,单位为毫秒
*/
public static void sleep(long milliseconds) {
try {
Thread.sleep(milliseconds);
} catch (InterruptedException e) {
return;
}
}
/**
* 停止线程池
* 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务.