Class Threads
java.lang.Object
com.github.mizool.core.concurrent.Threads
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Deprecated, for removal: This API element is subject to removal in a future version.static void
sleep
(long milliSeconds)
-
Method Details
-
sleep
public static void sleep(long milliSeconds) - Throws:
UncheckedInterruptedException
- If the thread was interrupted.
-
rethrowInterrupt
Deprecated, for removal: This API element is subject to removal in a future version.at the usage site, the compiler/IDE can’t know thatrethrowInterrupt()
contains athrow
, so it will complain that an exception was neither handled nor rethrown.Wraps the givenInterruptedException
in anUncheckedInterruptedException
and re-interrupts the thread.- Throws:
UncheckedInterruptedException
- Wrapping the givenInterruptedException
.
-
rethrowInterrupt()
contains athrow
, so it will complain that an exception was neither handled nor rethrown.