Class Threads
java.lang.Object
com.github.mizool.core.concurrent.Threads
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDeprecated, for removal: This API element is subject to removal in a future version.static voidsleep(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 givenInterruptedExceptionin anUncheckedInterruptedExceptionand re-interrupts the thread.- Throws:
UncheckedInterruptedException- Wrapping the givenInterruptedException.
-
rethrowInterrupt()contains athrow, so it will complain that an exception was neither handled nor rethrown.