()
| 15 | this.id = id; |
| 16 | } |
| 17 | @Override public void run() { |
| 18 | while(!generator.isCanceled()) { |
| 19 | int val = generator.next(); |
| 20 | if(val % 2 != 0) { |
| 21 | System.out.println(val + " not even!"); |
| 22 | generator.cancel(); // Cancels all EvenCheckers |
| 23 | } |
| 24 | } |
| 25 | } |
| 26 | // Test any IntGenerator: |
| 27 | public static void test(IntGenerator gp, int count) { |
| 28 | List<CompletableFuture<Void>> checkers = |
nothing calls this directly
no test coverage detected