public class ExecutorRunner extends java.lang.Object implements PromiseRunner
PromiseRunnable
instances (promise callbacks, etc) with a provided executor.
There is a lazily loaded global instance available for basic use cases, see getInstance()
for more details.
Constructor and Description |
---|
ExecutorRunner(java.util.concurrent.Executor executor) |
Modifier and Type | Method and Description |
---|---|
static ExecutorRunner |
getInstance()
Create a new global (singleton, though you can instance others like it manually) executor runner using a new
cached thread pool.
|
<T> void |
runPromise(PromiseRunnable<T> promise) |
public static ExecutorRunner getInstance()
public <T> void runPromise(PromiseRunnable<T> promise)
runPromise
in interface PromiseRunner