blob: 110242317d1f785f2e4b1b38a8a217dce973297f [file] [log] [blame]
package groovy;
public class TestInterruptor implements Runnable {
private Thread caller;
public TestInterruptor(Thread caller) {
this.caller = caller;
}
public void run() {
try {
Thread.currentThread().sleep(100); // enforce yield, so we have something to interrupt
} catch (InterruptedException e) {
// ignore
}
caller.interrupt();
}
}