| 5 | import java.util.concurrent.*; |
| 6 | |
| 7 | public class CountingTask implements Callable<Integer> { |
| 8 | final int id; |
| 9 | public CountingTask(int id) { this.id = id; } |
| 10 | @Override public Integer call() { |
| 11 | Integer val = 0; |
| 12 | for(int i = 0; i < 100; i++) |
| 13 | val++; |
| 14 | System.out.println(id + " " + |
| 15 | Thread.currentThread().getName() + " " + val); |
| 16 | return val; |
| 17 | } |
| 18 | } |
nothing calls this directly
no outgoing calls
no test coverage detected