Basically, what the question title says.
Thread t = new Thread(someRunnable);
t.start();
t.interrupt();
t.join(); //does an InterruptedException get thrown immediately here?
From my own tests, it seems to, but just wanted to be sure. I'm guessing Thread.join()
checks the interrupted
status of the thread before doing its "wait" routine?
interrupt()
interrupts the thread you interrupted, not the thread doing the interrupting.
c.f.
Thread.currentThread().interrupt();
t.join(); // will throw InterruptedException