OnJava8-Examples/concurrency/ExceptionThread.java

17 lines
430 B
Java
Raw Normal View History

2015-04-20 15:36:01 -07:00
//: concurrency/ExceptionThread.java
2015-05-29 14:18:51 -07:00
// <20>2015 MindView LLC: see Copyright.txt
2015-05-30 19:07:15 -07:00
// {ValidateByHand}
2015-04-20 15:36:01 -07:00
// {ThrowsException}
import java.util.concurrent.*;
public class ExceptionThread implements Runnable {
2015-05-05 11:20:13 -07:00
@Override
2015-04-20 15:36:01 -07:00
public void run() {
throw new RuntimeException();
}
public static void main(String[] args) {
ExecutorService exec = Executors.newCachedThreadPool();
exec.execute(new ExceptionThread());
}
} ///:~