@Test public void normalDone() { FutureTask<Object> ft = new FutureTask<Object>(Functions.EMPTY_RUNNABLE, null); FutureDisposable d = new FutureDisposable(ft, false); assertFalse(d.isDisposed()); assertFalse(d.isDisposed()); ft.run(); assertTrue(d.isDisposed()); }
@Override public boolean isDisposed() { Future<?> f = get(); return f == null || f.isDone(); }
FutureDisposable extends AtomicReference<Future<?>> implements Disposable { @Override public boolean isDisposed() { Future<?> f = get(); return f == null || f.isDone(); } }
FutureDisposable extends AtomicReference<Future<?>> implements Disposable { @Override public boolean isDisposed() { Future<?> f = get(); return f == null || f.isDone(); } FutureDisposable(Future<?> run, boolean allowInterrupt); }
FutureDisposable extends AtomicReference<Future<?>> implements Disposable { @Override public boolean isDisposed() { Future<?> f = get(); return f == null || f.isDone(); } FutureDisposable(Future<?> run, boolean allowInterrupt); @Override boolean isDisposed(); @Override void dispose(); }
FutureDisposable extends AtomicReference<Future<?>> implements Disposable { @Override public boolean isDisposed() { Future<?> f = get(); return f == null || f.isDone(); } FutureDisposable(Future<?> run, boolean allowInterrupt); @Override boolean isDisposed(); @Override void dispose();  }