static void cancelAndInterruptThreadAndWait(Thread t) { if (t == null) ret; cancelAndInterruptThread(t); waitUntilThreadNewOrTerminated(t); }