@ThreadSafe public interface SelectableThread
Modifier and Type | Method and Description |
---|---|
Thread |
asThread()
Thread form
|
void |
execute(Runnable task)
Adds the task to the queue
|
void |
interrupt()
Closes the thread and stops execution of new / remaining tasks
|
<V> Future<V> |
submitTask(Callable<V> task)
Runs a callback which returns a value as a future
|
<V> Future<V> submitTask(Callable<V> task)
V
- the return type of the callbacktask
- the callback to runvoid interrupt()
Copyright © 2016. All rights reserved.