@Test public void testNoStart() throws Exception { RunnableFuture<Integer> interruptible = getInterruptible(); expectedException.expect(TimeoutException.class); interruptible.get(10, TimeUnit.MILLISECONDS); }
@Override public final V get() throws InterruptedException, ExecutionException, CancellationException { lock.lock(); try { while (state != State.COMPLETED) { condition.await(); } return getReturnValue(); } finally { lock.unlock(); } }
InterruptibleFuture implements RunnableFuture<V> { @Override public final V get() throws InterruptedException, ExecutionException, CancellationException { lock.lock(); try { while (state != State.COMPLETED) { condition.await(); } return getReturnValue(); } finally { lock.unlock(); } } }
InterruptibleFuture implements RunnableFuture<V> { @Override public final V get() throws InterruptedException, ExecutionException, CancellationException { lock.lock(); try { while (state != State.COMPLETED) { condition.await(); } return getReturnValue(); } finally { lock.unlock(); } }  }
InterruptibleFuture implements RunnableFuture<V> { @Override public final V get() throws InterruptedException, ExecutionException, CancellationException { lock.lock(); try { while (state != State.COMPLETED) { condition.await(); } return getReturnValue(); } finally { lock.unlock(); } }  @Override final boolean cancel(boolean mayInterruptIfRunning); @Override final V get(); @Override final V get(long timeout, TimeUnit unit); @Override @SuppressWarnings("GuardedByChecker") final boolean isCancelled(); @Override @SuppressWarnings("GuardedByChecker") final boolean isDone(); @Override final void run(); static InterruptibleFuture<V> of(final Callable<V> callable); }
InterruptibleFuture implements RunnableFuture<V> { @Override public final V get() throws InterruptedException, ExecutionException, CancellationException { lock.lock(); try { while (state != State.COMPLETED) { condition.await(); } return getReturnValue(); } finally { lock.unlock(); } }  @Override final boolean cancel(boolean mayInterruptIfRunning); @Override final V get(); @Override final V get(long timeout, TimeUnit unit); @Override @SuppressWarnings("GuardedByChecker") final boolean isCancelled(); @Override @SuppressWarnings("GuardedByChecker") final boolean isDone(); @Override final void run(); static InterruptibleFuture<V> of(final Callable<V> callable);  }