优化 ThreadUtils.sleep 增加 currentThread().interrupt();

This commit is contained in:
thinkgem
2025-09-24 22:02:49 +08:00
parent e2b7db9668
commit 5cc48c44e5

View File

@@ -21,7 +21,7 @@ public class ThreadUtils {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
// Ignore.
Thread.currentThread().interrupt();
}
}
@@ -32,7 +32,7 @@ public class ThreadUtils {
try {
Thread.sleep(unit.toMillis(duration));
} catch (InterruptedException e) {
// Ignore.
Thread.currentThread().interrupt();
}
}