@Test public void testTimeoutInThreadDoesntInfluenceItsSibling() throws InterruptedException, BrokenBarrierException { ArrayList<Callable<Void>> tasks = createTasksWithBarriersToCall(); ExecutorService exec = Executors.newFixedThreadPool(2); List<Future<Void>> results = exec.invokeAll(tasks); exec.shutdown(); try { results.get(0).get(); fail("Didn't throw the exception as expected"); } catch (ExecutionException ex) { assertTrue(ex.getCause() instanceof TimeoutException); } results.get(1); }
public static Timeout get() { return INSTANCE.get(); }
TimeoutRegister { public static Timeout get() { return INSTANCE.get(); } }
TimeoutRegister { public static Timeout get() { return INSTANCE.get(); }  }
TimeoutRegister { public static Timeout get() { return INSTANCE.get(); }  static Timeout get(); static void set(Timeout timeout); static void remove(); }
TimeoutRegister { public static Timeout get() { return INSTANCE.get(); }  static Timeout get(); static void set(Timeout timeout); static void remove();  }