Constructor and Description |
---|
TaskOnEDT(Callable<V> fn)
The task @param fn should not be threaded; this class is intended to run
small snippets of code under the event dispatch thread, while still being
able to retrieve the result of the computation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
Will only prevent execution, not interrupt it if its happening.
|
V |
get() |
V |
get(long timeout,
TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public boolean cancel(boolean mayInterruptIfRunning)
public V get() throws InterruptedException, ExecutionException
get
in interface Future<V>
InterruptedException
ExecutionException
public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get
in interface Future<V>
InterruptedException
ExecutionException
TimeoutException
public boolean isCancelled()
isCancelled
in interface Future<V>
Copyright © 2015–2021 Fiji. All rights reserved.