blob: 4e01ede72774c1ce1000501bb9c5646edb22f2c9 [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();
}
}